Skip to content

Prevent CommitTooLargeException in OrderedEventProcessor on duplicate floods - #40242

Merged
stankiewicz merged 2 commits into
apache:masterfrom
vishalmore90:fix-issue-40240
Oct 5, 2026
Merged

stankiewicz merged 2 commits into
apache:masterfrom
vishalmore90:fix-issue-40240

Conversation

@vishalmore90

Copy link
Copy Markdown
Contributor

Fixes #40240

Context
A high volume of unprocessed or duplicate events entering the OrderedEventProcessor loop could previously trigger a CommitTooLargeException in Dataflow, because DLQ emissions were unconditionally appended to the bundle without respecting the maxNumberOfResultsToProduce pagination cap.

Changes

  • Tracked duplicate output in ProcessingState.java.
  • Augmented ProcessorDoFn.reachedMaxResultCountForBundle to consider duplicate volume.
  • Refactored the skipProcessing block inside ProcessorDoFn.processBufferedEventRange to break gracefully on limits instead of continuing infinitely.
  • Added validation test testLargeNumberOfDuplicatesPaginatesCorrectly.

Checklist

  • Code style follows the repository guidelines
  • Automated tests run and pass
  • Appropriate comments and documentation updated

@github-actions

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@stankiewicz

Copy link
Copy Markdown
Contributor

R: @slilichenko

@github-actions

Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@stankiewicz
stankiewicz merged commit dedbf9c into apache:master Oct 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Unrecoverable Runner Errors (CommitTooLargeException) When Emitting High Volume of Duplicate/Unprocessed Events in OrderedEventProcessor

2 participants