zhuzhurk commented on code in PR #21162:
URL: https://github.com/apache/flink/pull/21162#discussion_r1058779302


##########
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/VertexInputInfoComputationUtils.java:
##########
@@ -255,12 +259,11 @@ public int getNumPartitions() {
 
         @Override
         public int getNumSubpartitions(int partitionIndex) {
-            boolean isDynamicGraph = 
intermediateResult.getProducer().getGraph().isDynamic();
-            // Note that for non-dynamic graph, the num of subpartition has 
not been decided at
-            // this time
-            return isDynamicGraph
-                    ? 
intermediateResult.getPartitions()[partitionIndex].getNumberOfSubpartitions()
-                    : IntermediateResultPartition.NUM_SUBPARTITIONS_UNKNOWN;
+            // Note that this method should only be called for dynamic graph

Review Comment:
   Better to explain why, e.g. this method is used to compute which 
sub-partitions a consumer vertex should consume, however, for non-dynamic graph 
it is not needed, and the number of sub-partitions is not decided at this 
stage, due to the execution edge are not created.



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