This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
new a9470502b4 [branch-1.1-lts](memory) Disable mem tracker cancel query
#13080
a9470502b4 is described below
commit a9470502b401dc2882fc2e821340525f6195592c
Author: Xinyi Zou <[email protected]>
AuthorDate: Fri Sep 30 12:59:19 2022 +0800
[branch-1.1-lts](memory) Disable mem tracker cancel query #13080
---
be/src/common/config.h | 2 ++
be/src/runtime/memory/mem_tracker_limiter.h | 2 +-
be/src/runtime/memory/thread_mem_tracker_mgr.cpp | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/be/src/common/config.h b/be/src/common/config.h
index 3281cf81c0..2ea2eb10b2 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -632,6 +632,8 @@ CONF_Int16(mem_tracker_level, "0");
// Whether Hook TCmalloc new/delete, currently consume/release tls mem tracker
in Hook.
CONF_Bool(enable_tcmalloc_hook, "true");
+CONF_Bool(enable_cancel_query, "false");
+
// If true, switch TLS MemTracker to count more detailed memory,
// including caches such as ExecNode operators and TabletManager.
//
diff --git a/be/src/runtime/memory/mem_tracker_limiter.h
b/be/src/runtime/memory/mem_tracker_limiter.h
index 447dfe4e35..df3d271494 100644
--- a/be/src/runtime/memory/mem_tracker_limiter.h
+++ b/be/src/runtime/memory/mem_tracker_limiter.h
@@ -326,7 +326,7 @@ inline bool MemTrackerLimiter::try_consume(int64_t bytes,
std::string& failed_ms
}
inline Status MemTrackerLimiter::check_limit(int64_t bytes) {
- if (bytes <= 0) return Status::OK();
+ if (bytes <= 0 || !config::enable_cancel_query) return Status::OK();
if (sys_mem_exceed_limit_check(bytes)) {
return
Status::MemoryLimitExceeded(limit_exceeded_errmsg_sys_str(bytes));
}
diff --git a/be/src/runtime/memory/thread_mem_tracker_mgr.cpp
b/be/src/runtime/memory/thread_mem_tracker_mgr.cpp
index 3cb97c6ff8..7811fddeaa 100644
--- a/be/src/runtime/memory/thread_mem_tracker_mgr.cpp
+++ b/be/src/runtime/memory/thread_mem_tracker_mgr.cpp
@@ -45,7 +45,7 @@ void ThreadMemTrackerMgr::detach_limiter_tracker() {
}
void ThreadMemTrackerMgr::exceeded_cancel_task(const std::string&
cancel_details) {
- if (_fragment_instance_id_stack.back() != TUniqueId()) {
+ if (_fragment_instance_id_stack.back() != TUniqueId() &&
config::enable_cancel_query) {
ExecEnv::GetInstance()->fragment_mgr()->cancel(
_fragment_instance_id_stack.back(),
PPlanFragmentCancelReason::MEMORY_LIMIT_EXCEED,
cancel_details);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]