rkhachatryan commented on a change in pull request #11899:
URL: https://github.com/apache/flink/pull/11899#discussion_r417240865



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -503,44 +507,17 @@ public boolean isShutdown() {
                                "Only synchronous savepoints are allowed to 
advance the watermark to MAX."));
                }
 
-               final CompletableFuture<CompletedCheckpoint> 
onCompletionPromise =
-                       new CompletableFuture<>();
-               synchronized (lock) {
-                       if (isTriggering || !triggerRequestQueue.isEmpty()) {

Review comment:
       Summarizing the offline discussion:
   - if a request arrived while another is being *triggered* (or queue not 
empty) it is enqueued
   - after the current request is executed (only triggering, not checkpoint 
completion), the queue is checked
   
   Also, on completion of a checkpoint (not triggering) the queue is not 
checked; but the timer could be resumed which would result in checking the 
queue.
   
   In this PR:
   - the timer is not suspended at all
   - instead, if `queue.head` can't be executed now it is either dropped (if 
periodic) or delayed (if savepoint)
   - on checkpoint completion, the queue is checked




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to