Skip to content

streaming committer for across-batch pipelining#18

Merged
lesnik512 merged 1 commit intomainfrom
streaming-committer
May 3, 2026
Merged

streaming committer for across-batch pipelining#18
lesnik512 merged 1 commit intomainfrom
streaming-committer

Conversation

@lesnik512
Copy link
Copy Markdown
Member

Replaces the populate-then-commit two-phase loop in KafkaBatchCommitter with a single streaming loop that continuously absorbs queue items into per-partition pending state and commits each partition's contiguous-done prefix. Eliminates the queue-grows-unbounded pathology when one batch stalls on a slow handler. Fast partitions now commit independently of slow ones across batch boundaries, not just within a single batch.

commit_batch_size is still global; commit_batch_timeout_sec now anchors on first-task arrival rather than ticking through populate blocks. commit_all, close, and rebalance flushing are unchanged externally — flush events drive the loop the same way they always did.

Replaces the populate-then-commit two-phase loop in `KafkaBatchCommitter`
with a single streaming loop that continuously absorbs queue items into
per-partition pending state and commits each partition's contiguous-done
prefix. Eliminates the queue-grows-unbounded pathology when one batch
stalls on a slow handler. Fast partitions now commit independently of
slow ones across batch boundaries, not just within a single batch.

`commit_batch_size` is still global; `commit_batch_timeout_sec` now
anchors on first-task arrival rather than ticking through populate
blocks. `commit_all`, `close`, and rebalance flushing are unchanged
externally — flush events drive the loop the same way they always did.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lesnik512 lesnik512 self-assigned this May 3, 2026
@lesnik512 lesnik512 merged commit 954c960 into main May 3, 2026
5 checks passed
@lesnik512 lesnik512 deleted the streaming-committer branch May 3, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant