This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 6c30913a318b7c6ec217cbb75396e9029e211927 Author: yiguolei <676222...@qq.com> AuthorDate: Tue May 7 00:33:47 2024 +0800 [bugfix](memtracker) should count cancelled query in wg memory (#34443) Co-authored-by: yiguolei <yiguo...@gmail.com> --- be/src/runtime/memory/mem_tracker_limiter.h | 4 ---- be/src/runtime/workload_group/workload_group.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/be/src/runtime/memory/mem_tracker_limiter.h b/be/src/runtime/memory/mem_tracker_limiter.h index 240170ea881..2e510e1f462 100644 --- a/be/src/runtime/memory/mem_tracker_limiter.h +++ b/be/src/runtime/memory/mem_tracker_limiter.h @@ -141,10 +141,6 @@ public: Status check_limit(int64_t bytes = 0); bool is_overcommit_tracker() const { return type() == Type::QUERY || type() == Type::LOAD; } - // Returns the maximum consumption that can be made without exceeding the limit on - // this tracker limiter. - int64_t spare_capacity() const { return _limit - consumption(); } - bool is_query_cancelled() { return _is_query_cancelled; } void set_is_query_cancelled(bool is_cancelled) { _is_query_cancelled.store(is_cancelled); } diff --git a/be/src/runtime/workload_group/workload_group.cpp b/be/src/runtime/workload_group/workload_group.cpp index 01622204fd3..39e411de726 100644 --- a/be/src/runtime/workload_group/workload_group.cpp +++ b/be/src/runtime/workload_group/workload_group.cpp @@ -112,7 +112,7 @@ int64_t WorkloadGroup::memory_used() { for (const auto& trackerWptr : mem_tracker_group.trackers) { auto tracker = trackerWptr.lock(); CHECK(tracker != nullptr); - used_memory += tracker->is_query_cancelled() ? 0 : tracker->consumption(); + used_memory += tracker->consumption(); } } return used_memory; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org