From 1aaaae9db45edf4b4df098fc351d73f08b10f340 Mon Sep 17 00:00:00 2001 From: deardeng <565620795@qq.com> Date: Wed, 11 Jun 2025 19:57:32 +0800 Subject: [PATCH] [fix](trash) Fix shadow variable causing garbage scheduling time errors --- be/src/olap/olap_server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp index c31e4936e153da..bb914bb27b1968 100644 --- a/be/src/olap/olap_server.cpp +++ b/be/src/olap/olap_server.cpp @@ -387,7 +387,7 @@ void StorageEngine::_garbage_sweeper_thread_callback() { // when usage = 0.88, ratio is approximately 0.0057. double ratio = (1.1 * (pi / 2 - std::atan(usage * 100 / 5 - 14)) - 0.28) / pi; ratio = ratio > 0 ? ratio : 0; - auto curr_interval = uint32_t(max_interval * ratio); + curr_interval = uint32_t(max_interval * ratio); curr_interval = std::max(curr_interval, min_interval); curr_interval = std::min(curr_interval, max_interval); @@ -402,6 +402,8 @@ void StorageEngine::_garbage_sweeper_thread_callback() { << "see previous message for detail. err code=" << res; // do nothing. continue next loop. } + LOG(INFO) << "trash thread check usage=" << usage << " ratio=" << ratio + << " curr_interval=" << curr_interval; } while (!_stop_background_threads_latch.wait_for(std::chrono::seconds(curr_interval))); }