impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-6134: Update code base to use impala::ConditionVariable
Date Tue, 31 Oct 2017 18:12:33 GMT
Tim Armstrong has posted comments on this change. ( )

Change subject: IMPALA-6134: Update code base to use impala::ConditionVariable

Patch Set 1:


No serious concerns, nice to make our code more consistent.
File be/src/util/condition-variable.h:
PS1, Line 38:   void Wait(boost::unique_lock<boost::mutex>& lock) {
> I'm not yet familiar with this part of C++; why is 'inline' getting removed
"inline" is implied by the function being defined within the class body:
. So the inline specifier has no effect. I think in general we have a lot of unnecessary inline
specifiers in the code.
PS1, Line 48:  const timespec* timeout
I feel like this should be a const&, since it has to be non-null. That would let us eliminate
one overload.
PS1, Line 64:   template <typename duration_type>
It looks like this is only ever used with microseconds - maybe we should narrow the scope
of the API to use only that type so it's a bit more obvious what is valid input. (We should
definitely add a comment regardless documenting the behaviour).
PS1, Line 65:   bool TimedWait(boost::unique_lock<boost::mutex>& lock,
This looks like it only has one callsite. There's another callsite in BlockingQueue::BlockingPutWithTimeout()
that does the addition in the caller. We should either consistently use this API or consistently
do the calculation in the caller. I don't feel strongly either way.

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3085c6dcb42350b61244df6e7f091a1e7db356c9
Gerrit-Change-Number: 8428
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <>
Gerrit-Reviewer: Philip Zeyliger <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-Comment-Date: Tue, 31 Oct 2017 18:12:33 +0000
Gerrit-HasComments: Yes

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message