dawidwys commented on a change in pull request #15146:
URL: https://github.com/apache/flink/pull/15146#discussion_r593190297
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/checkpointing/AlternatingController.java
##########
@@ -188,12 +266,12 @@ private boolean canTimeout(CheckpointBarrier barrier) {
return barrier.getCheckpointOptions().isTimeoutable()
&& barrier.getId() <= lastSeenBarrier
&& barrier.getCheckpointOptions().getAlignmentTimeout() *
1_000_000
- < (System.nanoTime() - firstBarrierArrivalTime);
+ < (clock.relativeTimeNanos() - lastBarrierArrivalTime);
}
- private long getArrivalTime(CheckpointBarrier announcedBarrier) {
- return announcedBarrier.getCheckpointOptions().isTimeoutable()
- ? System.nanoTime()
- : Long.MAX_VALUE;
+ /** A provider for a method to register a delayed action. */
+ @FunctionalInterface
+ public interface DelayedActionRegistration {
+ void schedule(Callable<?> callable, Duration delay);
Review comment:
Yes, they do accumulate, but it does not affect the number of timers. As
you said each checkpoint causes timer registration. With a single checkpoint
every second you will have a single(two) timer(s) firing every second (with a
delay of the timeout alignment).
----------------------------------------------------------------
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]