TanYuxin-tyx commented on code in PR #21620:
URL: https://github.com/apache/flink/pull/21620#discussion_r1065924209


##########
flink-runtime/src/main/java/org/apache/flink/runtime/shuffle/NettyShuffleUtils.java:
##########
@@ -119,6 +142,95 @@ public static int computeNetworkBuffersForAnnouncing(
         return requirementForInputs + requirementForOutputs;
     }
 
+    public static int maxRequiredBuffersPerGate(
+            ResultPartitionType partitionType,
+            boolean isGateRequiredMaxBuffersConfigured,
+            int requiredMaxBuffersPerGate) {
+        int requiredMaxBuffers;
+        if (isGateRequiredMaxBuffersConfigured) {
+            requiredMaxBuffers = requiredMaxBuffersPerGate;
+        } else {
+            requiredMaxBuffers =
+                    
partitionType.isBlockingOrBlockingPersistentResultPartition()
+                            ? DEFAULT_MAX_BUFFERS_PER_GATE_FOR_BLOCKING
+                            : DEFAULT_MAX_BUFFERS_PER_GATE_FOR_STREAM;

Review Comment:
   Rename it to DEFAULT_MAX_BUFFERS_PER_GATE_FOR_BATCH



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

Reply via email to