mirror of https://github.com/milvus-io/milvus.git
fix: Skip erase field if index build on PK field (#39370)
Related to #39339 --------- Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/39411/head
parent
c22e457c59
commit
7cac87caca
|
@ -229,8 +229,10 @@ ChunkedSegmentSealedImpl::LoadScalarIndex(const LoadIndexInfo& info) {
|
|||
set_bit(index_ready_bitset_, field_id, true);
|
||||
update_row_count(row_count);
|
||||
// release field column if the index contains raw data
|
||||
// only release non-primary field when in pk sorted mode
|
||||
if (scalar_indexings_[field_id]->HasRawData() &&
|
||||
get_bit(field_data_ready_bitset_, field_id)) {
|
||||
get_bit(field_data_ready_bitset_, field_id) &&
|
||||
(schema_->get_primary_field_id() != field_id || !is_sorted_by_pk_)) {
|
||||
fields_.erase(field_id);
|
||||
set_bit(field_data_ready_bitset_, field_id, false);
|
||||
}
|
||||
|
|
|
@ -266,8 +266,10 @@ SegmentSealedImpl::LoadScalarIndex(const LoadIndexInfo& info) {
|
|||
set_bit(index_ready_bitset_, field_id, true);
|
||||
update_row_count(row_count);
|
||||
// release field column if the index contains raw data
|
||||
// only release non-primary field
|
||||
if (scalar_indexings_[field_id]->HasRawData() &&
|
||||
get_bit(field_data_ready_bitset_, field_id)) {
|
||||
get_bit(field_data_ready_bitset_, field_id) &&
|
||||
(schema_->get_primary_field_id() != field_id || !is_sorted_by_pk_)) {
|
||||
fields_.erase(field_id);
|
||||
set_bit(field_data_ready_bitset_, field_id, false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue