apache / apache/beam

Optimize state cleanup at end-of-window

Open
#20,096 0 comments 0 reactions 0 assignees View on GitHub
dataflow improvement P3 runners
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

When using state with a large keyspace, you can end up with a large amount of state cleanup timers set to fire all 1ms after the end of a window.  This can cause a momentary (I've observed 1-3 minute) lag in processing while windmill and the java harness fire and process these cleanup timers.

By spreading the firing over a short period after the end of the window, we can decorrelate the firing of the timers and smooth the load out, resulting in much less impact from state cleanup.

Imported from Jira [BEAM-9308](https://issues.apache.org/jira/browse/BEAM-9308). Original Jira may contain additional context.
Reported by: SteveNiemitz.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the state cleanup timer scheduling described in the issue, including the windmill and Java harness paths, and consult the linked BEAM-9308 context for additional details. The work is complete when cleanup timers no longer fire in one concentrated burst immediately after the window, reducing the observed processing lag.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
stream-processing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.