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


##########
docs/content/docs/dev/datastream/fault-tolerance/checkpointing.md:
##########
@@ -277,11 +277,10 @@ task with the number of new subtasks equal to the number 
of running tasks.
 
 ### Waiting for the final checkpoint before task exit
 
-To ensure all the records could be committed for operators using the two-phase 
commit, 
-the tasks would wait for the final checkpoint completed successfully after all 
the operators finished. 
-It needs to be noted that this behavior would prolong the execution time of 
tasks. 
-If the checkpoint interval is long, the execution time would also be prolonged 
largely. 
-For the worst case, if the checkpoint interval is set to `Long.MAX_VALUE`, 
-the tasks would in fact be blocked forever since the final checkpoint would 
never happen.
+To ensure all the records could be committed for operators using the two-phase 
commit,
+the tasks would wait for the final checkpoint completed successfully after all 
the operators finished.
+The final checkpoint would be triggered immediately after all operators 
finished, without waiting

Review Comment:
   OK, but would it be better to replace the "received" with "reached"? When we 
say "received", it often along with an event, but users should not be aware of 
the END_OF_DATA event.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java:
##########
@@ -502,6 +503,20 @@ public CompletableFuture<Acknowledge> 
updateTaskExecutionState(
         return FutureUtils.completedExceptionally(taskExecutionException);
     }
 
+    @Override
+    public void notifyTaskFinishing(final ExecutionAttemptID executionAttempt) 
{
+        if (jobGraph.getJobType() == JobType.STREAMING

Review Comment:
   1. It's true. Refer to the 
[doc](https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/execution_mode/#checkpointing),
 checkpointing is not supported in Batch mode even if it is enabled.
   2. We can keep the condition, so the `all-tasks-finishing` check can be 
omitted in Batch mode.



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