Re: Slow flink checkpoint
Posted by
Fabian Hueske-2 on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Slow-flink-checkpoint-tp18946p18991.html
Hi,
Yes, you cannot start a separate thread to cleanup the state.
State is managed by Flink and can only be accessed at certain points in time when the user code is called.
If you are using event time, another trick you could play is to only register all timers on (currentWatermark + 1).
That will cause the trigger to fire whenever the watermark advances. You could store all relevant timestamps in a ListState and act on all timers that are less than the currentWatermark.
Also, since there is only a single timer per timestamp (currentWM + 1) there will be only one watermark per key.
Best, Fabian