cosven commented on code in PR #49383: URL: https://github.com/apache/doris/pull/49383#discussion_r2086904783
########## be/src/olap/tablet_manager.cpp: ########## @@ -1133,6 +1133,39 @@ Status TabletManager::start_trash_sweep() { for_each_tablet([](const TabletSharedPtr& tablet) { tablet->delete_expired_stale_rowset(); }, filter_all_tablets); + if (config::enable_check_agg_and_remove_pre_rowsets_delete_bitmap) { + int64_t max_useless_rowset_count = 0; + int64_t tablet_id_with_max_useless_rowset_count = 0; + int64_t max_useless_rowset_version_count = 0; + int64_t tablet_id_with_max_useless_rowset_version_count = 0; + OlapStopWatch watch; + for_each_tablet( + [&](const TabletSharedPtr& tablet) { + int64_t useless_rowset_count = 0; + int64_t useless_rowset_version_count = 0; + tablet->check_agg_delete_bitmap_for_stale_rowsets(useless_rowset_count, + useless_rowset_version_count); + if (useless_rowset_count > max_useless_rowset_count) { + max_useless_rowset_count = useless_rowset_count; + tablet_id_with_max_useless_rowset_count = tablet->tablet_id(); + } + if (useless_rowset_version_count > max_useless_rowset_version_count) { + max_useless_rowset_version_count = useless_rowset_version_count; + tablet_id_with_max_useless_rowset_version_count = tablet->tablet_id(); + } Review Comment: 感觉求 useless_rowset_count 的总和比较有参考价值,它的和表示了有多少个 delete bitmap 泄露了。算出 useless_rowset_count 的最大值,似乎参考意义不大? max_useless_rowset_version_count 也是类似。 -- 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