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_r250840172
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1277,6 +1284,38 @@ private void discardCheckpoint(PendingCheckpoint
pendingCheckpoint, @Nullable Th
}
}
+ private void tryHandleCheckpointException(DeclineCheckpoint message,
PendingCheckpoint currentCheckpoint) {
+ if (message.getReason() != null
+ && !(message.getReason() instanceof
CheckpointDeclineException)
+ && failOnCheckpointingErrors
+ && !currentCheckpoint.getProps().isSavepoint()) {
+
+ 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) {
+ LOG.error("Can not find the failed execution id
{} for job {} with checkpoint id {} " +
+ "in waiting acknowledge task
list.",
+ failedExecutionID, message.getJob(),
message.getCheckpointId());
+ throw new IllegalStateException("Can not find
the failed execution id : " + failedExecutionID
+ + " for job " + message.getJob() + "
with checkpoint id" + message.getCheckpointId()
Review comment:
good catch, updated.
----------------------------------------------------------------
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