rkhachatryan commented on code in PR #29031:
URL: https://github.com/apache/flink/pull/29031#discussion_r3872568895
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCheckpointPlanCalculator.java:
##########
@@ -130,6 +133,26 @@ private void checkAllTasksInitiated() throws
CheckpointException {
}
}
+ /**
+ * Aborts the checkpoint if any task is already FAILED or CANCELED (a
failover is in progress).
+ * Otherwise such a terminal task would be mis-classified as finished (see
{@link
+ * #collectTaskRunningStatus()}) and could yield an empty plan that
completes with zero acks.
+ *
+ * @throws CheckpointException if some task has failed or been canceled.
+ */
+ private void checkNoTasksFailedOrCanceled() throws CheckpointException {
+ for (ExecutionVertex task : allTasks) {
+ ExecutionState state =
task.getCurrentExecutionAttempt().getState();
+ if (state == ExecutionState.FAILED || state ==
ExecutionState.CANCELED) {
Review Comment:
What about CANCELLING state?
Or maybe we should rather make this more explicit and only allow to
checkpoint in RUNNING and FINISHED states?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]