Michael Ho has posted comments on this change. Change subject: IMPALA-4026: Implement double-buffering for BlockingQueue ......................................................................
Patch Set 7: (2 comments) http://gerrit.cloudera.org:8080/#/c/4350/7/be/src/util/blocking-queue.h File be/src/util/blocking-queue.h: PS7, Line 171: put_list_.size > Right, I understand that, but that doesn't mean Size() should return any ra Actually, even with holding the write lock, there is still a window in which the get_list_size_ may be stale so the caller of Size() may see zero even if get_list_ is non-empty. The new patch fixes this race by setting get_list_size_ too before dropping write lock. http://gerrit.cloudera.org:8080/#/c/4350/9/be/src/util/blocking-queue.h File be/src/util/blocking-queue.h: PS9, Line 201: > That's my preference but i don't feel too strongly. Tried removing const but it affects callers of Size() which also has const. Don't wanna open another can of worm. -- To view, visit http://gerrit.cloudera.org:8080/4350 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9f4cf351455efefb0f3bb791cf9bc82d1421d54 Gerrit-PatchSet: 7 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Michael Ho <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Chen Huang <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Juan Yu <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Mostafa Mokhtar <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
