You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Kenneth Knowles (JIRA)" <ji...@apache.org> on 2018/01/21 23:41:00 UTC

[jira] [Comment Edited] (BEAM-3332) AfterProcessingTimer trigger not firing if invoked exactly on time

    [ https://issues.apache.org/jira/browse/BEAM-3332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16333743#comment-16333743 ] 

Kenneth Knowles edited comment on BEAM-3332 at 1/21/18 11:40 PM:
-----------------------------------------------------------------

I would treat the Java direct runner as the reference, unless there is another idea. So: https://github.com/apache/beam/blob/master/runners/direct-java/src/main/java/org/apache/beam/runners/direct/WatermarkManager.java#L745

I know we had an off-by-one difference in the FlinkRunner for event time timers that was causing a similar problem. Perhaps your runner also needs an adjustment by one to work with Beam?


was (Author: kenn):
I would treat the Java direct runner as the reference, unless there is another idea. So: https://github.com/apache/beam/blob/master/runners/direct-java/src/main/java/org/apache/beam/runners/direct/WatermarkManager.java#L745

Are you using FlinkRunner? I know we had an off-by-one different for event time timers that was causing a similar problem.

> AfterProcessingTimer trigger not firing if invoked exactly on time
> ------------------------------------------------------------------
>
>                 Key: BEAM-3332
>                 URL: https://issues.apache.org/jira/browse/BEAM-3332
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-core
>    Affects Versions: 2.0.0, 2.1.0, 2.2.0
>            Reporter: Shen Li
>            Assignee: Kenneth Knowles
>            Priority: Trivial
>             Fix For: 2.3.0
>
>
> I occasionally run into an issue that the processing time trigger is invoked on time, but the TriggerStateMachienRunner#shouldFire() returns false. After comparing time instances, I found that this issue occurs when the trigger is invoked exactly on time. It is because the AfterDelayFromFirstElementStateMachine does the following:
> {quote}    return delayedUntil != null
>         && getCurrentTime(context) != null
>         && getCurrentTime(context).isAfter(delayedUntil);{quote}
> which only returns true when the current processing time is AFTER (exclude equals) delayUntil. Should it actually be !getCurrentTime(context).isBefore(delayedUntil) ?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)