Sweta,

Flink does not include watermarks in savepoints, nor are they included in
aligned checkpoints. For what it's worth, I believe that with unaligned
checkpoints in-flight watermarks are included in checkpoints, but I don't
believe that would solve the problem, since the watermark strategy's state
is still lost during a restart.

I can't think of any way to guarantee that all possibly late events will be
deterministically identified as late. The commonly used
bounded-out-of-orderness watermark strategy doesn't guarantee this either,
even without a restart (because watermarks are delayed by the auto
watermark interval, rather than being produced at every conceivable
opportunity).

If this is a strong requirement, you could decide not to rely on watermarks
for dropping late events, and implement the logic yourself in a process
function.

Best,
David

On Wed, Jun 8, 2022 at 6:10 PM Sweta Kalakuntla <skalakun...@bandwidth.com>
wrote:

> Hi,
>
> I want to understand if flink saves a watermark during savepoint and if
> not, how do we achieve this?
>
> We are seeing an issue where on recovery, the job processes some late
> events which should have been discarded if the job were to be running
> without any downtime.
>
> Thank you,
> Sweta
>

Reply via email to