This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new c16cc5c602 [fix](memtracker) Fix load channel memory tracker are not refreshed in time (#15048) c16cc5c602 is described below commit c16cc5c60252b1b66d74ddc8c86c6a63aae91ba1 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 e0ac827fb3..b3c97723d1 100644 --- a/be/src/common/daemon.cpp +++ b/be/src/common/daemon.cpp @@ -205,6 +205,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(); @@ -245,8 +248,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