becketqin commented on a change in pull request #12234:
URL: https://github.com/apache/flink/pull/12234#discussion_r429987997
##########
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:
If the `checkpointFuture` is completed by the coordinator executor
before `whenComplete` is invoked here which shuts the valve, it seems possible
that some events get into the valve after the snapshot is taken but before the
valve is shut. That may result in inconsistent state between the TM and
Coordinator.
----------------------------------------------------------------
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]