zhuzhurk commented on a change in pull request #10309: [FLINK-14909][runtime] 
Let tasks get scheduled in topological order when possible
URL: https://github.com/apache/flink/pull/10309#discussion_r351101643
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultScheduler.java
 ##########
 @@ -222,7 +231,10 @@ private Runnable restartTasks(final 
Set<ExecutionVertexVersion> executionVertexV
                return () -> {
                        final Set<ExecutionVertexID> verticesToRestart = 
executionVertexVersioner.getUnmodifiedExecutionVertices(executionVertexVersions);
 
-                       resetForNewExecutions(verticesToRestart);
+                       final List<ExecutionVertexID> verticesToRestartSorted = 
new ArrayList<>(verticesToRestart);
+                       
verticesToRestartSorted.sort(executionVertexIDComparator);
+
+                       resetForNewExecutions(verticesToRestartSorted);
 
 Review comment:
   `resetForNewExecutions` actually indicates a state transition to CREATED 
though we did not log it yet. So I think it's better to keep it in order.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to