carp84 commented on a change in pull request #9128: [FLINK-13256] Ensure 
periodical checkpoint still valid when region failover abort pending checkpoints
URL: https://github.com/apache/flink/pull/9128#discussion_r304046764
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
 ##########
 @@ -489,18 +489,15 @@ public PendingCheckpoint triggerCheckpoint(
                                }
 
                                // make sure the minimum interval between 
checkpoints has passed
-                               final long earliestNext = 
lastCheckpointCompletionNanos + minPauseBetweenCheckpointsNanos;
-                               final long durationTillNextMillis = 
(earliestNext - System.nanoTime()) / 1_000_000;
+                               final long durationTillNextMillis = 
getDurationTillNextMillis();
 
 Review comment:
   This is good abstraction. Actually we could further abstract the whole logic 
of check against max concurrent checkpoint attempt and minimum checkpoint 
interval (L623-645 duplicates L482-503)

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to