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

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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 331c33149f [fix](memory) Fix Allocator check mem tracker limit #24711
331c33149f is described below

commit 331c33149fc03062868215e56154e61da8757189
Author: Xinyi Zou <[email protected]>
AuthorDate: Thu Sep 21 14:19:24 2023 +0800

    [fix](memory) Fix Allocator check mem tracker limit #24711
---
 be/src/vec/common/allocator.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/be/src/vec/common/allocator.cpp b/be/src/vec/common/allocator.cpp
index ed3a2440ee..d5fbd0a963 100644
--- a/be/src/vec/common/allocator.cpp
+++ b/be/src/vec/common/allocator.cpp
@@ -107,9 +107,11 @@ void Allocator<clear_memory_, mmap_populate, 
use_mmap>::sys_memory_check(size_t
             }
             // else, enough memory is available, the query continues execute.
         } else if (doris::enable_thread_catch_bad_alloc) {
-            LOG(INFO) << fmt::format("throw exception, {}.", err_msg);
+            LOG(INFO) << fmt::format("sys memory check failed, throw 
exception, {}.", err_msg);
             doris::MemTrackerLimiter::print_log_process_usage();
             throw doris::Exception(doris::ErrorCode::MEM_ALLOC_FAILED, 
err_msg);
+        } else {
+            LOG(INFO) << fmt::format("sys memory check failed, no throw 
exception, {}.", err_msg);
         }
     }
 }
@@ -137,9 +139,12 @@ void Allocator<clear_memory_, mmap_populate, 
use_mmap>::memory_tracker_check(siz
                                          
print_id(doris::thread_context()->task_id()), err_msg);
                 throw doris::Exception(doris::ErrorCode::MEM_ALLOC_FAILED, 
err_msg);
             }
-        } else {
-            LOG(INFO) << fmt::format("throw exception, {}.", err_msg);
+        } else if (doris::enable_thread_catch_bad_alloc) {
+            LOG(INFO) << fmt::format("memory tracker check failed, throw 
exception, {}.", err_msg);
             throw doris::Exception(doris::ErrorCode::MEM_ALLOC_FAILED, 
err_msg);
+        } else {
+            LOG(INFO) << fmt::format("memory tracker check failed, no throw 
exception, {}.",
+                                     err_msg);
         }
     }
 }


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

Reply via email to