This is an automated email from the ASF dual-hosted git repository. zouxinyi pushed a commit to branch revert-11980-dev-1.1.2_fix_DORIS-809 in repository https://gitbox.apache.org/repos/asf/doris.git
commit e087140daa1052fed48faba080c68a23ca634e69 Author: Xinyi Zou <zouxiny...@gmail.com> AuthorDate: Tue Aug 23 17:38:55 2022 +0800 Revert "[dev-1.1.2](memtracker) Fix DCHECK consumption is greater than 0 in old mem tracker #11980" This reverts commit c33ebbf03f7a54886a5b3280d5fd92cae2cc0bd8. --- be/src/runtime/mem_tracker.cpp | 4 ++-- be/src/runtime/mem_tracker.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/be/src/runtime/mem_tracker.cpp b/be/src/runtime/mem_tracker.cpp index d3779f8dbb..350f7bc311 100644 --- a/be/src/runtime/mem_tracker.cpp +++ b/be/src/runtime/mem_tracker.cpp @@ -266,8 +266,8 @@ MemTracker::~MemTracker() { delete reservation_counters_.load(); if (parent()) { - // DCHECK(consumption() == 0) << "Memory tracker " << debug_string() - // << " has unreleased consumption " << consumption(); + DCHECK(consumption() == 0) << "Memory tracker " << debug_string() + << " has unreleased consumption " << consumption(); parent_->Release(consumption()); lock_guard<SpinLock> l(parent_->child_trackers_lock_); diff --git a/be/src/runtime/mem_tracker.h b/be/src/runtime/mem_tracker.h index 8b9f754633..9166462aba 100644 --- a/be/src/runtime/mem_tracker.h +++ b/be/src/runtime/mem_tracker.h @@ -249,11 +249,11 @@ public: /// metric. Don't blow up in this case. (Note that this doesn't affect non-process /// trackers since we can enforce that the reported memory usage is internally /// consistent.) - // if (LIKELY(tracker->consumption_metric_ == nullptr)) { - // DCHECK_GE(tracker->consumption_->current_value(), 0) - // << std::endl - // << tracker->LogUsage(UNLIMITED_DEPTH); - // } + if (LIKELY(tracker->consumption_metric_ == nullptr)) { + DCHECK_GE(tracker->consumption_->current_value(), 0) + << std::endl + << tracker->LogUsage(UNLIMITED_DEPTH); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org