enhance: store system fields in segcore (#28524)

we need the system fields info for some usacase
fix: #28523

---------

Signed-off-by: yah01 <yah2er0ne@outlook.com>
pull/28424/head
yah01 2023-11-21 09:28:22 +08:00 committed by GitHub
parent 7445d3711c
commit 02c5a649cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -46,7 +46,6 @@ Schema::ParseFrom(const milvus::proto::schema::CollectionSchema& schema_proto) {
AssertInfo(is_system,
"invalid system type: name(" + name.get() + "), id(" +
std::to_string(field_id.get()) + ")");
continue;
}
auto data_type = DataType(child.data_type());

View File

@ -103,7 +103,11 @@ SegmentGrowingImpl::Insert(int64_t reserved_offset,
reserved_offset, timestamps_raw, num_rows);
insert_record_.row_ids_.set_data_raw(reserved_offset, row_ids, num_rows);
for (auto [field_id, field_meta] : schema_->get_fields()) {
AssertInfo(field_id_to_offset.count(field_id), "Cannot find field_id");
if (field_id.get() < START_USER_FIELDID) {
continue;
}
AssertInfo(field_id_to_offset.count(field_id),
fmt::format("can't find field {}", field_id.get()));
auto data_offset = field_id_to_offset[field_id];
if (!indexing_record_.SyncDataWithIndex(field_id)) {
insert_record_.get_field_data_base(field_id)->set_data_raw(