beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (BEAM-3776) StateMerging.mergeWatermarks sets a late watermark hold for late merging windows that depend only on the window
Date Mon, 12 Mar 2018 18:06:00 GMT


ASF GitHub Bot logged work on BEAM-3776:

                Author: ASF GitHub Bot
            Created on: 12/Mar/18 18:05
            Start Date: 12/Mar/18 18:05
    Worklog Time Spent: 10m 
      Work Description: huygaa11 commented on a change in pull request #4793: [BEAM-3776]
Fix issue with merging late windows where a watermark hold could be added behind the input

 File path: runners/core-java/src/main/java/org/apache/beam/runners/core/
 @@ -247,8 +249,26 @@ private Instant addGarbageCollectionHold(
    * Prefetch watermark holds in preparation for merging.
-  public void prefetchOnMerge(MergingStateAccessor<?, W> state) {
-    StateMerging.prefetchWatermarks(state, elementHoldTag);
+  public void prefetchOnMerge(MergingStateAccessor<?, W> context) {
+    Map<W, WatermarkHoldState> map = context.accessInEachMergingWindow(elementHoldTag);
 Review comment:
   Is there any specific reason why code is moved out from

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 79554)
    Time Spent: 50m  (was: 40m)

> StateMerging.mergeWatermarks sets a late watermark hold for late merging windows that
depend only on the window
> ---------------------------------------------------------------------------------------------------------------
>                 Key: BEAM-3776
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-core
>    Affects Versions: 2.1.0, 2.2.0, 2.3.0
>            Reporter: Sam Whittle
>            Assignee: Sam Whittle
>            Priority: Critical
>          Time Spent: 50m
>  Remaining Estimate: 0h
> WatermarkHold.addElementHold and WatermarkHold.addGarbageCollectionHold take to not
add holds that would be before the input watermark.
> However WatermarkHold.onMerge calls StateMerging.mergeWatermarks which if the window
depends only on window, sets a hold for the end of the window regardless of the input watermark.
> Thus if you have a WindowingStrategy such as:
> WindowingStrategy.of(Sessions.withGapDuration(gapDuration))
>  .withMode(AccumulationMode.DISCARDING_FIRED_PANES)
>  .withTrigger(
>  Repeatedly.forever(
>  AfterWatermark.pastEndOfWindow()
>  .withLateFirings(AfterPane.elementCountAtLeast(10))))
>  .withAllowedLateness(allowedLateness))
> and you merge windows that are late, you might end up holding the watermark until the
allowedLateness has passed.

This message was sent by Atlassian JIRA

View raw message