becketqin commented on code in PR #18956:
URL: https://github.com/apache/flink/pull/18956#discussion_r842590549
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java:
##########
@@ -654,6 +661,19 @@ private void
startTriggeringCheckpoint(CheckpointTriggerRequest request) {
}
return null;
}));
+
+ pendingCheckpointCompletableFuture.thenAccept(
+ pendingCheckpoint -> {
+ synchronized (lock) {
+ if (!pendingCheckpoint.isDisposed()) {
+ pendingCheckpointPromises.put(
+ pendingCheckpoint.getCheckpointID(),
checkpointComplete);
+ } else {
+ // what TODO?
+ checkpointComplete.completeExceptionally(new
RuntimeException());
Review Comment:
It looks that this only happens when the pending checkpoint got aborted
right after it is created. Should probably use
`PendingCheckpoint.getFailureCause()` instead.
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java:
##########
@@ -124,6 +124,9 @@
@GuardedBy("lock")
private final Map<Long, PendingCheckpoint> pendingCheckpoints;
+ @GuardedBy("lock")
+ private final Map<Long, CompletableFuture<?>> pendingCheckpointPromises;
Review Comment:
Could the pending future just be a part of `PendingCheckpoint`?
--
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]