Alex Behm has posted comments on this change. Change subject: IMPALA-4026: Implement double-buffering for BlockingQueue. ......................................................................
Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/4350/2/be/src/util/blocking-queue.h File be/src/util/blocking-queue.h: Line 40: /// held before 'write_lock_'. describe the read_list_ and write_list_ swapping Line 58: bool BlockingGet(T* out) { Threads in here will only detect shutdown after completely draining the read_list_. That seems like a slight behavioral change, not sure if it can cause problems. Consider grabbing the read_lock_ Shutdown() and checking for shutdown here regardless of read_list_ size. Line 147: boost::lock_guard<boost::mutex> write_lock(write_lock_); Seems a little saner to grab both read_lock_ and write_lock_ although not strictly necessary. -- 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: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Michael Ho <k...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Chen Huang <paulhuan...@utexas.edu> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Michael Ho <k...@cloudera.com> Gerrit-Reviewer: Mostafa Mokhtar <mmokh...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-HasComments: Yes