Rashmin Patel
04/05/2023, 8:59 AMContinuousProcessingTimeTrigger
goes into infinite loop (register+fire).
Upon further debugging, it seems that this PR ( 👉 https://github.com/apache/flink/pull/17106/files) is causing the problem.
Full Description:
We are hitting this issue in time windowing operator.
stream.
.windowAll(TumblingEventTimeWindowAssigner.of(Time.days(1))
.trigger(ContinuousProcessingTimeTrigger.of(Time.seconds(10)))
.allowedLateness(Time.days(1))
Let's say today is day T
, then my windowState will also contain pane of T-1
to `T`th day as well (as per allowedLateness = 1 day)
As per ContinuousProcessingTimeTrigger.registerNextFireTimestamp(. . .)
in 1.16.0,
Now for window pane ofCopy codelong nextFireTimestamp = Math.min(time + interval, window.maxTimestamp());
T-1
to `T`th day
window.maxTimestamp()
will be T
and time + interval
will be some T + x
(where T + x < T + 1)
So min of both expressions will always be T
, that will become timer.getTimestamp().
Now in InternalTimerServiceImpl.onProcessingTime(long time)
```while ((timer = processingTimeTimersQueue.peek()) != null && timer.getTimestamp() <= time) {
// triggerTarget.onProcessingTime(timer);
}```timer.getTimestamp() =
T
time = T + x
So this will never come out of the loop !!!
Can someone help me with this on how to proceed further ?Martijn Visser
04/05/2023, 9:01 AMRashmin Patel
04/05/2023, 9:05 AMMartijn Visser
04/05/2023, 9:05 AMRashmin Patel
04/05/2023, 10:28 AMContinuousProcessingTimeTrigger
.
I assume this should not cause any issue. Please guide if you have a different opinion.Martijn Visser
04/05/2023, 11:38 AMRashmin Patel
04/11/2023, 10:19 AMContinuousProcessingTimeTrigger
flink version: 1.16.0 (or any version which has this PR #17106)
By further debugging, I found that using event-time based assigner with procTime trigger is causing the issue.Martijn Visser
04/11/2023, 10:21 AMRashmin Patel
04/11/2023, 10:49 AMRashmin Patel
04/11/2023, 11:06 AMRashmin Patel
04/12/2023, 7:20 AM