jiangxin369 commented on code in PR #22670:
URL: https://github.com/apache/flink/pull/22670#discussion_r1244726141


##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java:
##########
@@ -236,6 +239,16 @@ public SchedulerBase(
         this.exceptionHistory =
                 new BoundedFIFOQueue<>(
                         
jobMasterConfiguration.getInteger(WebOptions.MAX_EXCEPTION_HISTORY_SIZE));
+
+        this.finishingTasks = createFinishingTasks();
+    }
+
+    private Map<JobVertexID, BitSet> createFinishingTasks() {
+        Map<JobVertexID, BitSet> map = new HashMap<>();
+        for (ExecutionJobVertex vertex : 
getExecutionGraph().getAllVertices().values()) {
+            map.put(vertex.getJobVertexId(), new BitSet());

Review Comment:
   Actually, we don't have to. I suppose you are talking about a situation that 
the job is stopped with some subtasks finished and then restarted. In such 
cases, all tasks would be reinitializing after the job is restarted and then 
transform to `RUNNING` and `FINISHED`, also the `EndOfData` would be sent.
   To verify it , I add a test case 
`ImmediateCheckpointingAfterAllTasksFinishedITCase#testRestoreAfterSomeTasksFinished`.



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