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


##########
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:
   hmm, yeah I suppose they do have a bit of a complicated interaction... that 
setting applies to input waiting to be merged and this one applies to the 
amount of output that has been merged and is waiting by downstream stuff to be 
picked up. That said, i'm not really sure what to do instead, and I wanted to 
increase specifically the amount of merged output to be available so that slow 
readers don't cause pushback everywhere else.



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