Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/10977 )
Change subject: IMPALA-7296: bytes limit for row batch queue ...................................................................... Patch Set 5: (3 comments) http://gerrit.cloudera.org:8080/#/c/10977/5/be/src/util/blocking-queue.h File be/src/util/blocking-queue.h: http://gerrit.cloudera.org:8080/#/c/10977/5/be/src/util/blocking-queue.h@142 PS5, Line 142: int64_t val_bytes = ElemBytesFn()(val); this can go up outside the lock, right? http://gerrit.cloudera.org:8080/#/c/10977/5/be/src/util/blocking-queue.h@170 PS5, Line 170: int64_t val_bytes = ElemBytesFn()(val); same, can compute outside the lock http://gerrit.cloudera.org:8080/#/c/10977/5/be/src/util/blocking-queue.h@249 PS5, Line 249: get_bytes_dequeued_.Load(); : if (dequeued == 0) return false; : put_bytes_enqueued_ -= dequeued; : get_bytes_dequeued_.Add(-dequeued); could you just Exchange(0) rather than loading and decrementing? seems like it's one atomic op instead of two and equally correct -- To view, visit http://gerrit.cloudera.org:8080/10977 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iaa06d1d8da2a6d101efda08f620c0bf84a71e681 Gerrit-Change-Number: 10977 Gerrit-PatchSet: 5 Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Wed, 25 Jul 2018 02:03:50 +0000 Gerrit-HasComments: Yes
