mirror of https://github.com/milvus-io/milvus.git
fix: can't find Chunk struct after growing support mmap (#33951)
issue: https://github.com/milvus-io/milvus/issues/32984 Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>pull/33947/head
parent
5cb0760187
commit
b460862537
|
@ -1561,17 +1561,20 @@ SegmentSealedImpl::mask_with_timestamps(BitsetType& bitset_chunk,
|
|||
// TODO change the
|
||||
AssertInfo(insert_record_.timestamps_.num_chunk() == 1,
|
||||
"num chunk not equal to 1 for sealed segment");
|
||||
const auto& timestamps_data = insert_record_.timestamps_.get_chunk(0);
|
||||
AssertInfo(timestamps_data.size() == get_row_count(),
|
||||
auto timestamps_data =
|
||||
(const milvus::Timestamp*)insert_record_.timestamps_.get_chunk_data(0);
|
||||
auto timestamps_data_size = insert_record_.timestamps_.get_chunk_size(0);
|
||||
|
||||
AssertInfo(timestamps_data_size == get_row_count(),
|
||||
fmt::format("Timestamp size not equal to row count: {}, {}",
|
||||
timestamps_data.size(),
|
||||
timestamps_data_size,
|
||||
get_row_count()));
|
||||
auto range = insert_record_.timestamp_index_.get_active_range(timestamp);
|
||||
|
||||
// range == (size_, size_) and size_ is this->timestamps_.size().
|
||||
// it means these data are all useful, we don't need to update bitset_chunk.
|
||||
// It can be thought of as an OR operation with another bitmask that is all 0s, but it is not necessary to do so.
|
||||
if (range.first == range.second && range.first == timestamps_data.size()) {
|
||||
if (range.first == range.second && range.first == timestamps_data_size) {
|
||||
// just skip
|
||||
return;
|
||||
}
|
||||
|
@ -1582,7 +1585,7 @@ SegmentSealedImpl::mask_with_timestamps(BitsetType& bitset_chunk,
|
|||
return;
|
||||
}
|
||||
auto mask = TimestampIndex::GenerateBitset(
|
||||
timestamp, range, timestamps_data.data(), timestamps_data.size());
|
||||
timestamp, range, timestamps_data, timestamps_data_size);
|
||||
bitset_chunk |= mask;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue