rkhachatryan commented on a change in pull request #14740:
URL: https://github.com/apache/flink/pull/14740#discussion_r578709529



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -651,39 +681,52 @@ private void 
startTriggeringCheckpoint(CheckpointTriggerRequest request) {
         }
     }
 
+    private CompletableFuture<CheckpointPlan> calculateCheckpointPlan() {
+        return checkpointPlanCalculator
+                .calculateCheckpointPlan()
+                // Disable checkpoints after tasks finished according to the 
flag.
+                .thenApplyAsync(
+                        plan -> {
+                            if (!allowCheckpointsAfterTasksFinished
+                                    && !plan.getFinishedTasks().isEmpty()) {
+                                throw new CompletionException(

Review comment:
       Should we do this check **before** computing the plan? 
   Otherwise, 
   1. the flag doesn't prevent existing deployments from potential performance 
degradation
   2. the plan is computed for no purpose
   
   I think it can also be put it planCalculator if it's easier.
   
   WDYT?




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


Reply via email to