gianm commented on code in PR #14130:
URL: https://github.com/apache/druid/pull/14130#discussion_r1173907213


##########
processing/src/main/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequence.java:
##########
@@ -796,6 +796,7 @@ public boolean block() throws InterruptedException
         if (hasTimeout) {
           final long thisTimeoutNanos = timeoutAtNanos - System.nanoTime();
           if (thisTimeoutNanos < 0) {
+            item = null;

Review Comment:
   What's this line & similar ones like it for?



##########
processing/src/main/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequence.java:
##########
@@ -895,7 +897,7 @@ public ResultBatch<E> accumulate(ResultBatch<E> 
accumulated, E in)
               accumulated.add(in);
               count++;
               if (count % batchSize == 0) {
-                yield();
+                this.yield();

Review Comment:
   Is this change cosmetic or does it change behavior?



##########
processing/src/test/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequenceTest.java:
##########
@@ -443,12 +439,10 @@ public void testExceptionOnInputSequenceRead() throws 
Exception
     input.add(explodingSequence(15));
     input.add(nonBlockingSequence(25));
 
-
-    expectedException.expect(RuntimeException.class);
-    expectedException.expectMessage(
-        "exploded"
-    );
-    assertException(input);
+    Throwable t = Assert.assertThrows(RuntimeException.class, () -> 
assertException(input));
+    Assert.assertEquals("exploded", t.getMessage());
+    Assert.assertTrue(pool.awaitQuiescence(1, TimeUnit.SECONDS));

Review Comment:
   suggestion— put the wait-for-quiescence stuff in `@After`



##########
processing/src/main/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequence.java:
##########
@@ -1069,7 +1072,7 @@ public boolean block()
     @Override
     public boolean isReleasable()
     {
-      return resultBatch != null && !resultBatch.isDrained();
+      return yielder.isDone() || (resultBatch != null && 
!resultBatch.isDrained());

Review Comment:
   Is this fixing something?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to