fix: fix snapshot or size when query (#38549)

#38472

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
This commit is contained in:
zhagnlu 2024-12-18 16:42:45 +08:00 committed by GitHub
parent 894c203f27
commit 87056be748
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -177,9 +177,10 @@ class DeletedRecord {
}
if (loc >= 0) {
next_iter = snap_next_iter_[loc];
Assert(snapshots_[loc].second.size() <= bitset.size());
auto or_size =
std::min(snapshots_[loc].second.size(), bitset.size());
bitset.inplace_or_with_count(snapshots_[loc].second,
snapshots_[loc].second.size());
or_size);
hit_snapshot = true;
}
}