From 0d7b050e85d9b91e5ae192e26834a2782a76ea8d Mon Sep 17 00:00:00 2001 From: eldenmoon <15605149486@163.com> Date: Tue, 28 Nov 2023 11:16:39 +0800 Subject: [PATCH] [chore](tablet-manager) add log to detect cost of tablets move to trash --- be/src/olap/tablet_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/be/src/olap/tablet_manager.cpp b/be/src/olap/tablet_manager.cpp index f6cfb6b6dc4dac..14c7abb48b3428 100644 --- a/be/src/olap/tablet_manager.cpp +++ b/be/src/olap/tablet_manager.cpp @@ -1085,6 +1085,8 @@ Status TabletManager::start_trash_sweep() { } _shutdown_tablets.clear(); } + MonotonicStopWatch timer; + timer.start(); std::lock_guard wrlock(_shutdown_deleting_tablets_lock); auto it = _shutdown_deleting_tablets.begin(); while (it != _shutdown_deleting_tablets.end()) { @@ -1164,6 +1166,8 @@ Status TabletManager::start_trash_sweep() { break; } } + LOG(INFO) << "Finshed clean " << clean_num << " items in " + << timer.elapsed_time() / 1000 / 100 << "ms"; // >= 200 means there may be more tablets need to be handled // So continue } while (clean_num >= 200);