This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit 12192e3f139833ee9c88fcd804f4923a977c215e Author: Xinyi Zou <zouxiny...@gmail.com> AuthorDate: Fri Dec 16 10:43:03 2022 +0800 [fix](memtracker) Fix load channel memory tracker are not refreshed in time (#15048) --- be/src/common/daemon.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/be/src/common/daemon.cpp b/be/src/common/daemon.cpp index 497edd3037..fb306c21a0 100644 --- a/be/src/common/daemon.cpp +++ b/be/src/common/daemon.cpp @@ -202,6 +202,9 @@ void Daemon::memory_maintenance_thread() { int64_t interval_milliseconds = config::memory_maintenance_sleep_time_ms; while (!_stop_background_threads_latch.wait_for( std::chrono::milliseconds(interval_milliseconds))) { + if (!MemInfo::initialized()) { + continue; + } // Refresh process memory metrics. doris::PerfCounters::refresh_proc_status(); doris::MemInfo::refresh_proc_meminfo(); @@ -240,8 +243,10 @@ void Daemon::load_channel_tracker_refresh_thread() { // Refresh the memory statistics of the load channel tracker more frequently, // which helps to accurately control the memory of LoadChannelMgr. while (!_stop_background_threads_latch.wait_for( - std::chrono::seconds(config::load_channel_memory_refresh_sleep_time_ms))) { - doris::ExecEnv::GetInstance()->load_channel_mgr()->refresh_mem_tracker(); + std::chrono::milliseconds(config::load_channel_memory_refresh_sleep_time_ms))) { + if (ExecEnv::GetInstance()->initialized()) { + doris::ExecEnv::GetInstance()->load_channel_mgr()->refresh_mem_tracker(); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org