Skip to content

Commit

Permalink
fix:fix delete record assert failed
Browse files Browse the repository at this point in the history
Signed-off-by: luzhang <[email protected]>
  • Loading branch information
luzhang committed Dec 19, 2024
1 parent b537a72 commit 6edde81
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions internal/core/src/segcore/DeletedRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,17 @@ class DeletedRecord {
InternalPush(pks, timestamps);

SortedDeleteList::Accessor accessor(deleted_lists_);
auto* last = accessor.last();
Assert(last != nullptr);
max_load_timestamp_ = last->first;
if (!deleted_lists_->empty()) {
auto* last = accessor.last();
Assert(last != nullptr);
max_load_timestamp_ = last->first;
} else {
for (size_t i = 0; i < pks.size(); ++i) {
if (timestamps[i] > max_load_timestamp_) {
max_load_timestamp_ = timestamps[i];
}
}
}

//TODO: add support for dump snapshot when load finished
}
Expand Down

0 comments on commit 6edde81

Please sign in to comment.