mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
issue: https://github.com/milvus-io/milvus/issues/41435 --------- Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
2.2 KiB
2.2 KiB
SegmentSealed
SegmentSealed has an extra interface rather than SegmentInterface:
LoadIndex(loadIndexInfo): load the index. indexInfo contains:FieldIdIndexParams: index parameters in KV structure KVVecIndex: vector index
LoadFieldData(loadFieldDataInfo): load column data, could be either scalar column or vector column- Note: indexes and vector data for the same column may coexist. Indexes are prioritized in the search
DropIndex(fieldId): drop and release an existing index of a specified field
Search is executable as long as all the columns involved in the search are loaded.
SegmentSealedImpl internal data definition
-
row_count_opt_:- Fill row count when loading the first entity
- All the other columns loaded must match the same row count
-
xxx_ready_bitset_&system_ready_count_- Used to record whether the corresponding column is loaded. Bitset corresponds to FieldOffset
- Query is executable if and only if all the following conditions are met:
- system_ready_count_ == 2, which means all the system columns' RowId/Timestamp are loaded
- The scalar columns involved in the query is loaded
- For the vector columns involved in the query, either the original data or the index is loaded
-
scalar_indexings_: store scalar index- Use StructuredSortedIndex in Knowhere
-
primary_key_index_: store index for pk column- Use brand new ScalarIndexBase format
- Note: The functions here may overlap with scalar indexes. It is recommended to replace scalar index with ScalarIndexBase
-
field_datas_: store original dataaligned_vector<char>format guaranteesint/floatdata are aligned
-
SealedIndexingRecord vecindexs_: store vector index -
row_ids_/timestamps_: RowId/Timestamp data -
TimestampIndex: Index for Timestamp column -
schema: schema
SegmentSealedImpl internal function definition
- Most functions are the implementation of the corresponding functions of the segment interface, which will not be repeated here.
update_row_count: Used to update the row_count field.mask_with_timestamps: Use Timestamp column to update search bitmask, used to support Time Travel function.