yunfengzhou-hub commented on code in PR #22931: URL: https://github.com/apache/flink/pull/22931#discussion_r1277383109
########## flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java: ########## @@ -183,6 +189,15 @@ public class CheckpointCoordinator { /** A handle to the current periodic trigger, to cancel it when necessary. */ private ScheduledFuture<?> currentPeriodicTrigger; + /** + * The timestamp (via {@link Clock#relativeTimeMillis()}) when the next checkpoint will be + * triggered. + * + * <p>If it's value is {@link Long#MAX_VALUE}, it means there is not a next checkpoint + * scheduled. + */ + private volatile long nextCheckpointTriggeringRelativeTime; Review Comment: `nextCheckpointTriggeringRelativeTime` and `currentPeriodicTrigger` should be updated together, so I added `synchronized(lock){}` around code blocks related to these variables instead of adding `@GuardedBy("lock")` to each of them. -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org