You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Robert Bradshaw (Jira)" <ji...@apache.org> on 2022/01/11 21:32:00 UTC

[jira] [Reopened] (BEAM-13213) OnWindowExpiration does not work without other state

     [ https://issues.apache.org/jira/browse/BEAM-13213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Bradshaw reopened BEAM-13213:
------------------------------------
    Assignee: Emily Ye  (was: Lara Schmidt)

The fix has been merged into master, but re-opening to ensure it makes it into the marked SDK.

> OnWindowExpiration does not work without other state
> ----------------------------------------------------
>
>                 Key: BEAM-13213
>                 URL: https://issues.apache.org/jira/browse/BEAM-13213
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Lara Schmidt
>            Assignee: Emily Ye
>            Priority: P2
>             Fix For: 2.36.0
>
>
> OnWindowExpiration requires that a DoFn be marked as using state/timers. However OnWindowExpiration does not actually mark that a DoFn needs state/timers. Therefore if you do not have any other state/timers in the DoFn, OnWindowExpiration is just never called.
> Likely not noticed as it was intended as a way to clean up state at the end of the window - but it's not guaranteed this is the case.
> Here's the relevant functions which should probably take into account if this function exists. Note these aren't consistent either - so not sure which is used in which case.
> [https://github.com/apache/beam/blob/6c954ca7106e67c0834b0e74926c376f02d5f811/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignatures.java#L2497]
> [https://github.com/apache/beam/blob/6c954ca7106e67c0834b0e74926c376f02d5f811/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignature.java#L141]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)