dawidwys commented on a change in pull request #15146:
URL: https://github.com/apache/flink/pull/15146#discussion_r594166895
##########
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:
I am cancelling outdated timers in the new version. PTAL.
----------------------------------------------------------------
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]