Skip to content

Commit c33ebbf

Browse files
authored
[dev-1.1.2](memtracker) Fix DCHECK consumption is greater than 0 in old mem tracker #11980
1 parent 68cdc20 commit c33ebbf

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎be/src/runtime/mem_tracker.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ MemTracker::~MemTracker() {
266266
delete reservation_counters_.load();
267267

268268
if (parent()) {
269-
DCHECK(consumption() == 0) << "Memory tracker " << debug_string()
270-
<< " has unreleased consumption " << consumption();
269+
// DCHECK(consumption() == 0) << "Memory tracker " << debug_string()
270+
// << " has unreleased consumption " << consumption();
271271
parent_->Release(consumption());
272272

273273
lock_guard<SpinLock> l(parent_->child_trackers_lock_);

‎be/src/runtime/mem_tracker.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ class MemTracker : public std::enable_shared_from_this<MemTracker> {
249249
/// metric. Don't blow up in this case. (Note that this doesn't affect non-process
250250
/// trackers since we can enforce that the reported memory usage is internally
251251
/// consistent.)
252-
if (LIKELY(tracker->consumption_metric_ == nullptr)) {
253-
DCHECK_GE(tracker->consumption_->current_value(), 0)
254-
<< std::endl
255-
<< tracker->LogUsage(UNLIMITED_DEPTH);
256-
}
252+
// if (LIKELY(tracker->consumption_metric_ == nullptr)) {
253+
// DCHECK_GE(tracker->consumption_->current_value(), 0)
254+
// << std::endl
255+
// << tracker->LogUsage(UNLIMITED_DEPTH);
256+
// }
257257
}
258258
}
259259

0 commit comments

Comments
 (0)