Fix sealed segment get deleted bitmap assert (#10572)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
pull/10610/head
yukun 2021-10-25 21:18:47 +08:00 committed by GitHub
parent 2667103ba4
commit 6c13008dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -262,7 +262,7 @@ SegmentSealedImpl::get_deleted_bitmap(int64_t del_barrier,
if (del_barrier < old->del_barrier) { if (del_barrier < old->del_barrier) {
for (auto del_index = del_barrier; del_index < old->del_barrier; ++del_index) { for (auto del_index = del_barrier; del_index < old->del_barrier; ++del_index) {
int64_t the_offset = seg_offsets[del_index].get(); int64_t the_offset = seg_offsets[del_index].get();
AssertInfo(the_offset > 0, "Seg offset is invalid"); AssertInfo(the_offset >= 0, "Seg offset is invalid");
if (deleted_record_.timestamps_[del_index] < query_timestamp) { if (deleted_record_.timestamps_[del_index] < query_timestamp) {
bitmap->clear(the_offset); bitmap->clear(the_offset);
} }
@ -271,7 +271,7 @@ SegmentSealedImpl::get_deleted_bitmap(int64_t del_barrier,
} else { } else {
for (auto del_index = old->del_barrier; del_index < del_barrier; ++del_index) { for (auto del_index = old->del_barrier; del_index < del_barrier; ++del_index) {
int64_t the_offset = seg_offsets[del_index].get(); int64_t the_offset = seg_offsets[del_index].get();
AssertInfo(the_offset > 0, "Seg offset is invalid"); AssertInfo(the_offset >= 0, "Seg offset is invalid");
if (deleted_record_.timestamps_[del_index] < query_timestamp) { if (deleted_record_.timestamps_[del_index] < query_timestamp) {
bitmap->set(the_offset); bitmap->set(the_offset);
} }