Hello Norbert Luksa, Tim Armstrong, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/15050
to look at the new patch set (#3).
Change subject: IMPALA-9291: MemTracker's TryConsume() should behave consistent
with Consume()/Release()
......................................................................
IMPALA-9291: MemTracker's TryConsume() should behave consistent with
Consume()/Release()
Before this fix MemTracker::Consume() and Release() could take
negative numbers as arguments. In that case Consume(-val) would invoke
Release(val) and vice versa.
On the other hand, TryConsume() was a no-op for negative values and
returned success. This could lead to errors in the following case:
TryConsume(-42); // no-op
...
Release(-42); // -> Consume(42);
And in the end the mem tracker would think there is 42 bytes of
unallocated memory.
This commit changes mem-tracker to forbid negative values.
Testing:
* ran exhaustive tests
Change-Id: I22e613c49e4a6bd218e7f7f7c0d6bec95b75cff5
---
M be/src/runtime/mem-tracker-test.cc
M be/src/runtime/mem-tracker.h
2 files changed, 32 insertions(+), 24 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/50/15050/3
--
To view, visit http://gerrit.cloudera.org:8080/15050
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I22e613c49e4a6bd218e7f7f7c0d6bec95b75cff5
Gerrit-Change-Number: 15050
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Norbert Luksa <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>