klion26 commented on a change in pull request #7571: [FLINK-10724] Refactor
failure handling in check point coordinator
URL: https://github.com/apache/flink/pull/7571#discussion_r251379041
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1277,6 +1284,37 @@ private void discardCheckpoint(PendingCheckpoint
pendingCheckpoint, @Nullable Th
}
}
+ private void tryHandleCheckpointException(DeclineCheckpoint message,
PendingCheckpoint currentCheckpoint) {
+ boolean needFailJob = message.getReason() != null &&
!(message.getReason() instanceof CheckpointDeclineException)
+ && failOnCheckpointingErrors &&
!currentCheckpoint.getProps().isSavepoint();
+
+ if (needFailJob) {
+ boolean processed = false;
+ ExecutionAttemptID failedExecutionID =
message.getTaskExecutionId();
+ for (ExecutionVertex vertex : tasksToWaitFor) {
+ if
(vertex.getCurrentExecutionAttempt().getAttemptId().equals(failedExecutionID)) {
+ if (currentPeriodicTrigger != null) {
+
currentPeriodicTrigger.cancel(true);
+ currentPeriodicTrigger = null;
+ }
+
+ vertex.fail(message.getReason());
+ processed = true;
+ break;
+ }
+ }
+
+ if (!processed) {
Review comment:
In which case we could not find the ExecutionVertex corresponding to the
failed task? In `CheckpointCoordinator::receiveDeclineMessage` we have checked
the jobid, I think this `processed` will always be true, am I right?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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