pnowojski commented on code in PR #27921:
URL: https://github.com/apache/flink/pull/27921#discussion_r3136410101


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java:
##########
@@ -1996,6 +1996,16 @@ public long getCheckpointTimeout() {
         return checkpointTimeout;
     }
 
+    /**
+     * Returns {@code true} if enough time has elapsed since the last 
checkpoint completion to
+     * satisfy the configured {@code minPauseBetweenCheckpoints}. This can be 
used by callers that
+     * trigger non-periodic checkpoints but still wish to respect the 
min-pause constraint.
+     */
+    public boolean isMinPauseBetweenCheckpointsSatisfied() {

Review Comment:
   Most likely it needs lock, in order to get the correct value of 
`lastCheckpointCompletionRelativeTime`. Depends how 
`isMinPauseBetweenCheckpointsSatisfied` is used. For metrics we are usually 
fine accessing values on critical code paths without locks for performance 
reasons.



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

Reply via email to