yanghua 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_r251305175
##########
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:
When we can't find the ExecutionVertex corresponding to the failed task, it
is false. This judgment is more for defensive purposes.
----------------------------------------------------------------
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