1u0 commented on a change in pull request #9131: [FLINK-12858][checkpointing] 
Stop-with-savepoint, workaround: fail whole job when savepoint is declined by a 
task
URL: https://github.com/apache/flink/pull/9131#discussion_r304300312
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/LegacyScheduler.java
 ##########
 @@ -649,4 +659,22 @@ private String 
retrieveTaskManagerLocation(ExecutionAttemptID executionAttemptID
                        .map(TaskManagerLocation::toString)
                        .orElse("Unknown location");
        }
+
+       private static boolean isCheckpointDeclinedException(Throwable 
throwable) {
+               return ExceptionUtils.findThrowable(throwable, 
CheckpointException.class)
+                       .map(CheckpointException::getCheckpointFailureReason)
+                       .map(reason -> {
+                               switch (reason) {
+                                       case CHECKPOINT_DECLINED:
+                                       case CHECKPOINT_DECLINED_TASK_NOT_READY:
+                                       case CHECKPOINT_DECLINED_SUBSUMED:
+                                       case 
CHECKPOINT_DECLINED_ALIGNMENT_LIMIT_EXCEEDED:
+                                       case 
CHECKPOINT_DECLINED_INPUT_END_OF_STREAM:
 
 Review comment:
   **Update:** the check was inverted to be more pessimistic about savepoint 
failure reasons.

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