You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/05 09:50:33 UTC

[GitHub] [flink] becketqin commented on a diff in pull request #18956: [FLINK-26394] CheckpointCoordinator.isTriggering can not be reset in a particular case.

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org