Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/15050 )
Change subject: IMPALA-9291: MemTracker's TryConsume() should behave consistent with Consume()/Release() ...................................................................... Patch Set 5: (2 comments) http://gerrit.cloudera.org:8080/#/c/15050/5/be/src/runtime/mem-tracker.h File be/src/runtime/mem-tracker.h: http://gerrit.cloudera.org:8080/#/c/15050/5/be/src/runtime/mem-tracker.h@175 PS5, Line 175: if (UNLIKELY(bytes == 0)) return true; > Shouldn't it be handled like at Release? Since there is a DCHECK for this a The above DCHECK allows the value 0 and it should return success. We need this branch to avoid updating 'consumption_' when the argument is zero, even when we fetch the consumption from a metric. This behavior is aligned with the behavior of Consume()/Release(). http://gerrit.cloudera.org:8080/#/c/15050/5/be/src/runtime/mem-tracker.h@218 PS5, Line 218: < 0 > nit: did you mean <= ? < 0 hits DCHECK in debug, only needed for release. == 0 is needed in both release and debug to avoid updating 'consumption_' -- 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: comment Gerrit-Change-Id: I22e613c49e4a6bd218e7f7f7c0d6bec95b75cff5 Gerrit-Change-Number: 15050 Gerrit-PatchSet: 5 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]> Gerrit-Comment-Date: Wed, 22 Jan 2020 14:12:10 +0000 Gerrit-HasComments: Yes
