You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2022/10/10 08:08:16 UTC

[doris] branch branch-1.1-lts updated: [branch-1.1-lts](hot) Fix old mem tracker cancel (#13248)

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

dataroaring 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 579c60949c [branch-1.1-lts](hot) Fix old mem tracker cancel  (#13248)
579c60949c is described below

commit 579c60949c275b15f6f9bc8ba5806a71a6ad08db
Author: Xinyi Zou <zo...@gmail.com>
AuthorDate: Mon Oct 10 16:08:09 2022 +0800

    [branch-1.1-lts](hot) Fix old mem tracker cancel  (#13248)
---
 be/src/runtime/mem_tracker.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/be/src/runtime/mem_tracker.h b/be/src/runtime/mem_tracker.h
index a8d7a7f146..e7a14c1ac7 100644
--- a/be/src/runtime/mem_tracker.h
+++ b/be/src/runtime/mem_tracker.h
@@ -186,7 +186,7 @@ public:
         for (i = all_trackers_.size() - 1; i >= 0; --i) {
             MemTracker* tracker = all_trackers_[i];
             const int64_t limit = tracker->GetLimit(mode);
-            if (limit < 0 || !config::enable_cancel_query) {
+            if (limit < 0) {
                 tracker->consumption_->add(bytes); // No limit at this tracker.
             } else {
                 // If TryConsume fails, we can try to GC, but we may need to try several times if
@@ -262,7 +262,7 @@ public:
     /// exceeded.
     bool AnyLimitExceeded(MemLimit mode) {
         for (const auto& tracker : limit_trackers_) {
-            if (tracker->LimitExceeded(mode) && config::enable_cancel_query) {
+            if (tracker->LimitExceeded(mode)) {
                 return true;
             }
         }
@@ -281,7 +281,7 @@ public:
     // Return limit exceeded tracker or null
     MemTracker* find_limit_exceeded_tracker() {
         for (const auto& tracker : limit_trackers_) {
-            if (tracker->limit_exceeded() && config::enable_cancel_query) {
+            if (tracker->limit_exceeded()) {
                 return tracker;
             }
         }
@@ -298,7 +298,7 @@ public:
     void RefreshConsumptionFromMetric();
 
     // TODO(yingchun): following functions are old style which have no MemLimit parameter
-    bool limit_exceeded() const { return limit_ >= 0 && limit_ < consumption() && config::enable_cancel_query; }
+    bool limit_exceeded() const { return limit_ >= 0 && limit_ < consumption(); }
 
     int64_t limit() const { return limit_; }
     bool has_limit() const { return limit_ >= 0; }
@@ -396,7 +396,7 @@ public:
 
     static bool limit_exceeded(const std::vector<std::shared_ptr<MemTracker>>& trackers) {
         for (const auto& tracker : trackers) {
-            if (tracker->limit_exceeded() && config::enable_cancel_query) {
+            if (tracker->limit_exceeded()) {
                 // TODO: remove logging
                 LOG(WARNING) << "exceeded limit: limit=" << tracker->limit()
                              << " consumption=" << tracker->consumption();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org