You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Sahil Modak <sm...@paloaltonetworks.com> on 2022/01/25 17:49:42 UTC

Beams processing_time timer expiring early than expected

Hi,

We are using beam's PROCESSING_TIME based timers in a DoFn that operates on
a KV pair in a global window.

We are using 2 timers in our business logic and in one of our timer's
callback function, we are setting the second timer to expire after x
seconds. However, the observation is that this second timer is expiring
early than expected, and in some cases, it's expiring immediately.

We are setting both the timers using these lines of code:

clearRaisedTimer.offset(Duration.standardSeconds(60)).setRelative();


Is this a known issue, or are we missing something?

Thanks,
Sahil

Re: Beams processing_time timer expiring early than expected

Posted by Luke Cwik <lc...@google.com>.
What do you get returned for Timer.getCurrentRelativeTime() and how does
that compare to System.currentTimeMillis()?
What runner are you using?
Are you using Dataflow prime?


On Tue, Jan 25, 2022 at 9:50 AM Sahil Modak <sm...@paloaltonetworks.com>
wrote:

> Hi,
>
> We are using beam's PROCESSING_TIME based timers in a DoFn that operates
> on a KV pair in a global window.
>
> We are using 2 timers in our business logic and in one of our timer's
> callback function, we are setting the second timer to expire after x
> seconds. However, the observation is that this second timer is expiring
> early than expected, and in some cases, it's expiring immediately.
>
> We are setting both the timers using these lines of code:
>
> clearRaisedTimer.offset(Duration.standardSeconds(60)).setRelative();
>
>
> Is this a known issue, or are we missing something?
>
> Thanks,
> Sahil
>