Myasuka commented on a change in pull request #9364: 
[FLINK-13593][checkpointing] Prevent failing the wrong execution attempt in 
CheckpointFailureManager
URL: https://github.com/apache/flink/pull/9364#discussion_r311229514
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
 ##########
 @@ -575,8 +575,17 @@ public void enableCheckpointing(
                checkpointStatsTracker = checkNotNull(statsTracker, 
"CheckpointStatsTracker");
 
                CheckpointFailureManager failureManager = new 
CheckpointFailureManager(
-                               chkConfig.getTolerableCheckpointFailureNumber(),
-                               cause -> 
getJobMasterMainThreadExecutor().execute(() -> failGlobal(cause))
+                       chkConfig.getTolerableCheckpointFailureNumber(),
+                       (cause, failingAttempt) -> 
getJobMasterMainThreadExecutor().execute(() -> {
+                               if (failingAttempt == null) {
+                                       failGlobal(cause);
+                               } else {
+                                       final Execution failedExecution = 
currentExecutions.get(failingAttempt);
+                                       if (failedExecution != null && 
failedExecution.getState() == ExecutionState.RUNNING) {
+                                               failGlobal(cause);
+                                       }
 
 Review comment:
   How about adding a `LOG.warn` here just like `CheckpointCoordinator` 
received a `UNKNOWN AcknowledgeCheckpoint` ?

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