rkhachatryan commented on a change in pull request #15146:
URL: https://github.com/apache/flink/pull/15146#discussion_r593172534
##########
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:
> First of all I think the alignment timeout plays no role in the number
of timers
Could you explain why? My reasoning is:
- each checkpoint causes timer registration
- timer is not unregistered in the current implementation
- timer fires after alignment timeout
So during the alignment timeout, pedning timers accumulate.
----------------------------------------------------------------
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]