Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-3776

StateMerging.mergeWatermarks sets a late watermark hold for late merging windows that depend only on the window

Details

    • Bug
    • Status: Resolved
    • P1
    • Resolution: Fixed
    • 2.1.0, 2.2.0, 2.3.0, 2.4.0
    • 2.5.0
    • runner-core
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              scwhittle Sam Whittle
              scwhittle Sam Whittle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h
                  6h