impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4026: Implement double-buffering for BlockingQueue
Date Tue, 20 Sep 2016 00:19:19 GMT
Michael Ho has posted comments on this change.

Change subject: IMPALA-4026: Implement double-buffering for BlockingQueue

Patch Set 4:

File be/src/util/blocking-queue.h:

Line 36: /// if the queue is empty or full, respectively.
> I think we should clarify when the unblocking happens. In BlockingGet() it 
The new comment in BlockingGet() should help clarify it.

Line 95:     put_cv_.NotifyOne();
> Can you comment that this notification is racy: producers may not be notifi

Line 182:   /// Maximum number of elements in 'get_list_' + 'put_list_'.
> clarify as "Maximum total number" - if a reader wasn't careful they might t

PS4, Line 190: > >
> nit: we're generally using >> now that it works in c++11
File be/src/util/condition-variable.h:

Line 29: /// This has lower overhead than boost's implementation as it
> Nit: lines are wrapped very short here

> Nit: here and in the other places: does it work to put this on the line bef
Moved to the end of the class definition. That should be less confusing.

Line 43:   bool inline TimedWait(boost::unique_lock<boost::mutex>& lock,
> What does the return value mean?

Line 50:   void inline NotifyOne() { pthread_cond_signal(&cv_); }
> Nit: here and above, we usually put 'inline' before the return type.
Fixed. This convention is a bit inconsistent with where we put ALWAYS_INLINE/IR_NO_INLINE/IR_ALWAYS_INLINE.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9f4cf351455efefb0f3bb791cf9bc82d1421d54
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Ho <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Chen Huang <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Mostafa Mokhtar <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message