You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/10/12 16:19:09 UTC

[GitHub] [beam] reuvenlax commented on pull request #13032: [BEAM-11034] Avoid build-up of stateful garbage collection timers for…

reuvenlax commented on pull request #13032:
URL: https://github.com/apache/beam/pull/13032#issuecomment-707216813


   What onDrain method are you referring to?
   
   On Mon, Oct 12, 2020 at 9:16 AM Kenn Knowles <no...@github.com>
   wrote:
   
   > *@kennknowles* commented on this pull request.
   > ------------------------------
   >
   > In
   > runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/SimpleParDoFn.java
   > <https://github.com/apache/beam/pull/13032#discussion_r503400133>:
   >
   > >        Instant cleanupTime = earliestAllowableCleanupTime(window, windowingStrategy);
   > -      // if DoFn has OnWindowExpiration then set holds for system timer.
   > -      Instant cleanupOutputTimestamp =
   > -          fnSignature.onWindowExpiration() == null ? cleanupTime : cleanupTime.minus(1L);
   > -      stepContext.setStateCleanupTimer(
   > -          CLEANUP_TIMER_ID, window, windowCoder, cleanupTime, cleanupOutputTimestamp);
   > +      // Set a cleanup timer for state at the end of the window to trigger onWindowExpiration and
   > +      // garbage collect state. We avoid doing this for the global window if there is no window
   > +      // expiration set as the state will be up when the pipeline terminates. Setting the timer
   > +      // leads to a unbounded growth of timers for pipelines with many unique keys in the global
   > +      // window.
   > +      if (cleanupTime.isBefore(GlobalWindow.INSTANCE.maxTimestamp())
   >
   > Re-reading the bug and thinking about your comments, can we eliminate this
   > condition and invoke from some onDrain method?
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/beam/pull/13032#pullrequestreview-506754853>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AFAYJVNF2HY2AJWMWTQKBFLSKMTWLANCNFSM4SHHJYVQ>
   > .
   >
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org