Skip to content

KAFKA-20116: Forwad task-(end)-offset to task assignor (5/5)#22644

Open
mjsax wants to merge 3 commits into
apache:trunkfrom
mjsax:kafka-20116-forward-task-offsets
Open

KAFKA-20116: Forwad task-(end)-offset to task assignor (5/5)#22644
mjsax wants to merge 3 commits into
apache:trunkfrom
mjsax:kafka-20116-forward-task-offsets

Conversation

@mjsax

@mjsax mjsax commented Jun 23, 2026

Copy link
Copy Markdown
Member

This PR adds in-memory state to store task-offset-sum and
task-end-offset-sum, and wiring to forward both fields into the
"streams" task assignor.

We also ungate the warmup-tasks field on the heartbeat request handler.
The wiring to forward warmup-tasks field existed already.

Part of KIP-1071.

Reviewers: David Jacot david.jacot@gmail.com

@mjsax mjsax added streams kip Requires or implements a KIP labels Jun 23, 2026
@mjsax mjsax changed the title KAFKA-20116: Forwad task-(end)-offset-sum to task assignor (4/N) KAFKA-20116: Forwad task-(end)-offset to task assignor (4/N) Jun 23, 2026
@mjsax mjsax force-pushed the kafka-20116-forward-task-offsets branch from d6573f2 to cf629d5 Compare June 24, 2026 03:31
// independently: a null list means "unchanged since the last heartbeat", so we retain the previously reported
// value for whichever of the two is null and only update when at least one is reported.
if (taskOffsets != null || taskEndOffsets != null) {
group.updateTaskOffsets(memberId, group.taskOffsets(memberId).update(taskOffsets, taskEndOffsets));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they are transient, we may want to discuss whether using timeline data structures is the correct approach here. Those are usually backed by persisted records.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Good catch.

@mjsax mjsax force-pushed the kafka-20116-forward-task-offsets branch from 555347a to c6380f3 Compare June 24, 2026 19:05
@mjsax mjsax changed the title KAFKA-20116: Forwad task-(end)-offset to task assignor (4/N) KAFKA-20116: Forwad task-(end)-offset to task assignor (5/5) Jun 25, 2026
mjsax added 3 commits June 25, 2026 12:14
This PR adds in-memory state to store task-offset-sum and task-end-offset-sum,
and wiring to forward both fields into the "streams" task assignor.

We also ungate the warmup-tasks field on the heartbeat request handler.
The wiring to forward warmup-tasks field existed already.
@mjsax mjsax force-pushed the kafka-20116-forward-task-offsets branch from 6e34787 to eb4345a Compare June 25, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group-coordinator kip Requires or implements a KIP streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants