sachouche commented on a change in pull request #1470: DRILL-6746: Query can hang when PartitionSender task thread sees a co… URL: https://github.com/apache/drill/pull/1470#discussion_r219618211
########## File path: exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/SpoolingRawBatchBuffer.java ########## @@ -119,6 +119,19 @@ public RawFragmentBatch take() throws IOException, InterruptedException { return buffer.take().get(); } + @Override + public RawFragmentBatch poll(long timeout, TimeUnit timeUnit) throws InterruptedException, IOException { + RawFragmentBatchWrapper batchWrapper = buffer.poll(timeout, timeUnit); + if (batchWrapper != null) { + try { + return batchWrapper.get(); + } catch (InterruptedException e) { Review comment: You should not catch InterruptedException as it is being handled by caller; the handling is also different: - Upper code is having more logic on how to deal with an interrupted exception - This code is erasing the interrupted flag whereas caller code doesn't ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services