----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33091/#review79752 -----------------------------------------------------------
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/SendingAccountor.java <https://reviews.apache.org/r/33091/#comment129286> How about reducing the number of synchronizations of batchesSent by combining the get() and the addAndGet() in the loop body: public synchronized void waitForSendComplete() { int waitForBatches = batchesSet.get(); while(waitForBatches != 0) { try { wait.acquire(waitForBatches); waitForBatches = batchesSent.addAndGet(-1 * waitForBatches); } catch (InterruptedException e) { logger.warn("Interrupted while waiting for send complete. Continuing to wait.", e); } } And now that you're continuing to wait in a loop, we don't need the TODO anymore. - Chris Westin On April 10, 2015, 1 p.m., Steven Phillips wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33091/ > ----------------------------------------------------------- > > (Updated April 10, 2015, 1 p.m.) > > > Review request for drill. > > > Bugs: DRILL-2741 > https://issues.apache.org/jira/browse/DRILL-2741 > > > Repository: drill-git > > > Description > ------- > > DRILL-2741: Continue waiting for completion of sent batches when interrupted > > > Diffs > ----- > > > exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/SendingAccountor.java > 21fc800cc9855ee2da309934a4422dd37644f4bf > > Diff: https://reviews.apache.org/r/33091/diff/ > > > Testing > ------- > > > Thanks, > > Steven Phillips > >
