rohangarg commented on code in PR #13420:
URL: https://github.com/apache/druid/pull/13420#discussion_r1041434646


##########
core/src/main/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequence.java:
##########
@@ -121,8 +123,9 @@ public <OutType> Yielder<OutType> toYielder(OutType 
initValue, YieldingAccumulat
     if (inputSequences.isEmpty()) {
       return Sequences.<T>empty().toYielder(initValue, accumulator);
     }
-
-    final BlockingQueue<ResultBatch<T>> outputQueue = new 
ArrayBlockingQueue<>(queueSize);
+    // we make final output queue larger than the merging queues so if 
downstream readers are slower to read there is
+    // less chance of blocking the merge
+    final BlockingQueue<ResultBatch<T>> outputQueue = new 
ArrayBlockingQueue<>(4 * queueSize);

Review Comment:
   Yeah, I also didn't find a good way to compare and harmonize the two limits. 
I think this fine since the limit is still conservative here



-- 
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