becketqin commented on a change in pull request #12234:
URL: https://github.com/apache/flink/pull/12234#discussion_r431007926
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/OperatorCoordinatorCheckpoints.java
##########
@@ -58,7 +58,17 @@
final Collection<CompletableFuture<CoordinatorSnapshot>>
individualSnapshots = new ArrayList<>(coordinators.size());
for (final OperatorCoordinatorCheckpointContext coordinator :
coordinators) {
-
individualSnapshots.add(triggerCoordinatorCheckpoint(coordinator,
checkpointId));
+ final CompletableFuture<CoordinatorSnapshot>
checkpointFuture = triggerCoordinatorCheckpoint(coordinator, checkpointId);
+ coordinator.onCallTriggerCheckpoint(checkpointId);
+
+ individualSnapshots.add(checkpointFuture);
+ checkpointFuture.whenComplete((ignored, failure) -> {
+ if (failure != null) {
+ coordinator.abortCurrentTriggering();
+ } else {
+
coordinator.onCheckpointStateFutureComplete(checkpointId);
Review comment:
I don't have a code snippet in hand right now. But I can create one and
run in a tight loop to show the race condition.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]