mxm commented on code in PR #27404:
URL: https://github.com/apache/flink/pull/27404#discussion_r2713197883


##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobEdge.java:
##########
@@ -54,7 +54,8 @@ public class JobEdge implements java.io.Serializable {
 
     private final boolean isBroadcast;
 
-    private final boolean isForward;
+    private boolean isForward;
+    private final boolean initialForward;

Review Comment:
   Same here, let's not add extra fields for modification.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobEdge.java:
##########
@@ -35,7 +35,7 @@ public class JobEdge implements java.io.Serializable {
     private final JobVertex target;
 
     /** The distribution pattern that should be used for this job edge. */
-    private final DistributionPattern distributionPattern;
+    private DistributionPattern distributionPattern;

Review Comment:
   I think it is better not to mutate the existing JobGraph.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveScheduler.java:
##########
@@ -1473,8 +1474,11 @@ private ExecutionGraph 
createExecutionGraphAndRestoreState(
                                     new ExecutionStateUpdateListener[0]));
         }
 
+        final JobGraph adjustedJobGraph = jobInformation.copyJobGraph();
+        adaptiveChangeForwardJobEdges(adjustedJobGraph, 
adjustedParallelismStore);

Review Comment:
   Can we return a JobGraph copy with the adjustments from this method? I want 
to avoid mutating an existing JobGraph.



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