yunfengzhou-hub commented on code in PR #24272:
URL: https://github.com/apache/flink/pull/24272#discussion_r1502520887
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointFailureReason.java:
##########
@@ -61,6 +61,8 @@ public enum CheckpointFailureReason {
CHECKPOINT_COORDINATOR_SHUTDOWN(false, "CheckpointCoordinator shutdown."),
+ CHECKPOINT_COORDINATOR_START(false, "Checkpoint Coordinator is starting."),
Review Comment:
The message had been used to resolve the following race condition:
- A test case attempts to trigger stop-with-savepoint on a Flink job, during
which CheckpointCoordinator#stopCheckpointScheduler() would be invoked before
a savepoint is created.
- The behavior introduced in this PR would check and invoke
startCheckpointScheduler() if the running tasks contain no blocking edge and
the scheduler is not started yet, and the status of stop-with-savepoint also
meets this condition.
- startCheckpointScheduler() would invoke stopCheckpointScheduler() first,
which would cancel all ongoing and pending checkpoint/savepoints. The savepoint
triggered by the test case is aborted because of this, and then the test case
fails accordingly.
As a temporary solution, I have required startCheckpointScheduler() not to
invoke stopCheckpointScheduler() if the scheduler is not started yet, which
helps to spare savepoints from being canceled in this process. Given that the
race condition above would not occur once all tasks enter the running status,
this solution should be acceptable for now.
In the long run, I created FLINK-34519 to record the problem and basic ideas
to facilitate the checkpointing mechanism for batch/streaming unification
optimizations.
--
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]