Dan Hecht has posted comments on this change.
Change subject: IMPALA-4026: Implement double-buffering for BlockingQueue
Patch Set 5:
Line 79: row_batches_put_timer_ =
we usually do this in Open() or Prepare() (see other counters in e.g.
HdfsScanNodeBase. Also usually use ADD_COUNTER() macro (though I think we
should get rid of those soon).
PS5, Line 90: DCHECK
Line 102: put_cv_.NotifyOne();
is it worth explaining this race rather than fixing it? Doesn't pthreads
optimize this case correctly (when holding the "wait lock" when doing a signal,
it should just transfer the destination thread to the lock's wait queue rather
than waking it up). But maybe we aren't sure that optimization is implemented?
PS5, Line 137: GetSize
this is an unfortunate name. I read it to be the size of the "Get" list. Maybe
we could rename it Size()?
Line 171: // the queue's size could have changed once the lock is dropped.
how do you know the deque::size() method doesn't need the synchronization (on
x86 it's probably okay but maybe not other platforms). Would taking both locks
here be prohibitively expensive?
Line 197: boost::scoped_ptr<std::deque<T>> put_list_;
why add this extra indirection? couldn't we just do deque::swap() directly on
the deque, rather than using the ptr swap?
PS5, Line 29: doesn't have any logic to deal with thread interruption
what's the implication of that? are signals not handled properly?
To view, visit http://gerrit.cloudera.org:8080/4350
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
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>