This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new b66012d469 [cherrypick](memory) Fix GC after env Init #17545
b66012d469 is described below

commit b66012d46901afd01f84ca989175b75853bbbf1b
Author: Xinyi Zou <[email protected]>
AuthorDate: Wed Mar 8 07:25:03 2023 +0800

    [cherrypick](memory) Fix GC after env Init #17545
    
    Fix GC after env Init, otherwise, when the memory is insufficient, BE will 
start failure.
---
 be/src/common/daemon.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/common/daemon.cpp b/be/src/common/daemon.cpp
index 3f9f9494e7..2bdcbd414b 100644
--- a/be/src/common/daemon.cpp
+++ b/be/src/common/daemon.cpp
@@ -208,7 +208,7 @@ void Daemon::memory_maintenance_thread() {
     int64_t cache_gc_freed_mem = 0;
     while (!_stop_background_threads_latch.wait_for(
             std::chrono::milliseconds(interval_milliseconds))) {
-        if (!MemInfo::initialized()) {
+        if (!MemInfo::initialized() || !ExecEnv::GetInstance()->initialized()) 
{
             continue;
         }
         // Refresh process memory metrics.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to