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

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
 ##########
 @@ -1401,21 +1404,46 @@ public void run() {
        }
 
        private void failPendingCheckpoint(
-               final PendingCheckpoint pendingCheckpoint,
-               final CheckpointFailureReason reason) {
+                       final PendingCheckpoint pendingCheckpoint,
+                       final CheckpointFailureReason reason) {
 
                failPendingCheckpoint(pendingCheckpoint, reason, null);
        }
 
        private void failPendingCheckpoint(
+               final PendingCheckpoint pendingCheckpoint,
+               final CheckpointFailureReason reason,
+               final Throwable cause) {
+
+               CheckpointException exception = new CheckpointException(reason, 
cause);
+               pendingCheckpoint.abort(reason, cause);
+               failureManager.handleJobLevelCheckpointException(exception, 
pendingCheckpoint.getCheckpointId());
+
+               checkAndResetCheckpointScheduler();
+       }
+
+       private void failPendingCheckpointDueToTaskFailure(
+               final PendingCheckpoint pendingCheckpoint,
+               final CheckpointFailureReason reason,
+               final ExecutionAttemptID executionAttemptID) {
+
+               failPendingCheckpointDueToTaskFailure(pendingCheckpoint, 
reason, null, executionAttemptID);
+       }
+
+       private void failPendingCheckpointDueToTaskFailure(
                        final PendingCheckpoint pendingCheckpoint,
                        final CheckpointFailureReason reason,
-                       final Throwable cause) {
+                       final Throwable cause,
 
 Review comment:
   `@Nullable` is missing.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to