zhannngchen commented on code in PR #22984: URL: https://github.com/apache/doris/pull/22984#discussion_r1294319487
########## be/src/olap/tablet.cpp: ########## @@ -3698,16 +3821,33 @@ void Tablet::_remove_sentinel_mark_from_delete_bitmap(DeleteBitmapPtr delete_bit } Status Tablet::_check_delete_bitmap_correctness(DeleteBitmapPtr delete_bitmap, int64_t max_version, - const RowsetIdUnorderedSet& rowset_ids) const { + int64_t txn_id, + const RowsetIdUnorderedSet& rowset_ids, + bool with_meta_lock) { + RowsetIdUnorderedSet missing_ids; for (const auto& rowsetid : rowset_ids) { if (!delete_bitmap->delete_bitmap.contains( {rowsetid, DeleteBitmap::INVALID_SEGMENT_ID, 0})) { - LOG(WARNING) << "check delete bitmap correctness failed, can't find sentinel mark in " - "rowset with RowsetId:" - << rowsetid << ",max_version:" << max_version; - DCHECK(false) << "check delete bitmap correctness failed!"; - return Status::OK(); + missing_ids.insert(rowsetid); + } + } + + if (!missing_ids.empty()) { + LOG(WARNING) << "[txn_id:" << txn_id << "][tablet_id:" << tablet_id() + << "][max_version: " << max_version + << "] check delete bitmap correctness failed!"; + std::string rowset_status_string; + if (with_meta_lock) { + get_compaction_status_without_lock(&rowset_status_string); + } else { + get_compaction_status(&rowset_status_string); + } + LOG(WARNING) << rowset_status_string; + LOG(WARNING) << "can't find sentinel mark in the following rowsets:"; + for (const auto& rowsetid : missing_ids) { Review Comment: use `get_rowset_by_ids`, and print all rowset's version and rowset_id is enough. -- 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