zhannngchen commented on code in PR #22282: URL: https://github.com/apache/doris/pull/22282#discussion_r1282601038
########## be/src/olap/tablet.cpp: ########## @@ -3637,4 +3657,46 @@ Status Tablet::calc_delete_bitmap_between_segments( return Status::OK(); } +void Tablet::add_sentinel_mark_to_delete_bitmap(DeleteBitmapPtr delete_bitmap, + const RowsetIdUnorderedSet& rowsetids) { + for (const auto& rowsetid : rowsetids) { + delete_bitmap->add({rowsetid, DeleteBitmap::INVALID_SEGMENT_ID, 0}, + DeleteBitmap::ROWSET_SENTINEL_MARK); + } +} + +void Tablet::remove_sentinel_mark_from_delete_bitmap(DeleteBitmapPtr delete_bitmap) { + for (auto& [key, bitmap] : delete_bitmap->delete_bitmap) { + bitmap.remove(DeleteBitmap::ROWSET_SENTINEL_MARK); + } +} + +Status Tablet::check_delete_bitmap_correctness(DeleteBitmapPtr delete_bitmap, int64_t max_version) const { + std::map<RowsetId, bool> result; + RowsetIdUnorderedSet rowsets = all_rs_id(max_version); Review Comment: if you can reuse the `rowset_ids` from caller, then you don't need to acquire the lock here again -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org