From b4608625377f58e9c1357d9bc23a50a5433e2378 Mon Sep 17 00:00:00 2001 From: cqy123456 <39671710+cqy123456@users.noreply.github.com> Date: Tue, 18 Jun 2024 05:37:58 -0500 Subject: [PATCH] fix: can't find Chunk struct after growing support mmap (#33951) issue: https://github.com/milvus-io/milvus/issues/32984 Signed-off-by: cqy123456 --- internal/core/src/segcore/SegmentSealedImpl.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/internal/core/src/segcore/SegmentSealedImpl.cpp b/internal/core/src/segcore/SegmentSealedImpl.cpp index 1422fde332ed..6137d6f56758 100644 --- a/internal/core/src/segcore/SegmentSealedImpl.cpp +++ b/internal/core/src/segcore/SegmentSealedImpl.cpp @@ -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; }