This is an automated email from the ASF dual-hosted git repository.
zouxinyi pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
new 7dab6c4287 Revert "[dev-1.1.2](memtracker) Fix DCHECK consumption is
greater than 0 in old mem tracker #11980" (#12001)
7dab6c4287 is described below
commit 7dab6c4287f352efbc0d2852dab2c8d27b855f49
Author: Xinyi Zou <[email protected]>
AuthorDate: Tue Aug 23 17:40:01 2022 +0800
Revert "[dev-1.1.2](memtracker) Fix DCHECK consumption is greater than 0 in
old mem tracker #11980" (#12001)
This reverts commit c33ebbf03f7a54886a5b3280d5fd92cae2cc0bd8.
true error fixed in #12000
---
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: [email protected]
For additional commands, e-mail: [email protected]