zlzhang0122 commented on code in PR #18523:
URL: https://github.com/apache/flink/pull/18523#discussion_r1092837627


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultExecutionGraphFactory.java:
##########
@@ -197,9 +199,23 @@ public ExecutionGraph createAndRestoreExecutionGraph(
                 // check whether we can restore from a savepoint
                 tryRestoreExecutionGraphFromSavepoint(
                         newExecutionGraph, 
jobGraph.getSavepointRestoreSettings());
+
+                for (JobVertex jobVertex : jobGraph.getVertices()) {
+                    int maxParallelism =
+                            newExecutionGraph
+                                    .getAllVertices()
+                                    .get(jobVertex.getID())
+                                    .getMaxParallelism();
+
+                    jobVertex.setMaxParallelism(maxParallelism);
+                }
             }
         }
 
+        // set the basic properties
+
+        
newExecutionGraph.setJsonPlan(JsonPlanGenerator.generatePlan(jobGraph));

Review Comment:
   Here we have restored execution graph from savepoint, so we can easily get 
the right value of maxParallelism form savepoint, in 
`DefaultExecutionGraphBuilder` the value of maxParallelism may not be correct. 
And yes, we need `try-catch`.



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