cryptoe commented on code in PR #14117:
URL: https://github.com/apache/druid/pull/14117#discussion_r1174690114


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerMemoryParameters.java:
##########
@@ -309,8 +316,12 @@ public static WorkerMemoryParameters createInstance(
         )
     );
 
-    // Apportion max frames to all processors equally, then subtract one to 
account for an output frame.
-    final int superSorterMaxChannelsPerProcessor = maxNumFramesForSuperSorter 
/ superSorterMaxActiveProcessors - 1;
+    final int isSmallWorker = usableMemoryInJvm < 
SMALL_WORKER_CAPACITY_THRESHOLD_BYTES ? 1 : 0;
+    // Apportion max frames to all processors equally, then subtract one to 
account for an output frame and one to account
+    // for the durable storage's output frame in the supersorter

Review Comment:
   * Why does durable storage have an extra output frame?
   * Also why is the subtraction valid for small heaps and not bigger heaps. 
   * Please add a test case for `WorkerMemoryParametersTest` throwing 
NotEnoughtMemoryFault for a smaller heap. 
   



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