Skip to content

KAFKA-20434: Consumer group does not recompute assignment when static members rejoin with different assignor#22036

Open
dajac wants to merge 2 commits intoapache:trunkfrom
dajac:KAFKA-20434
Open

KAFKA-20434: Consumer group does not recompute assignment when static members rejoin with different assignor#22036
dajac wants to merge 2 commits intoapache:trunkfrom
dajac:KAFKA-20434

Conversation

@dajac
Copy link
Copy Markdown
Member

@dajac dajac commented Apr 13, 2026

When all static members of a consumer group using the consumer protocol
leave and rejoin with a different server-side assignor, the group does
not recompute the target assignment. The bumpGroupEpoch flag only
considers changes to subscribed topic names and regex but not the
preferred server assignor.

This patch adds a hasPreferredServerAssignorChanged check that
compares the effective preferred assignor (falling back to the default
when no member has an explicit preference) before and after the member
update. The group epoch is bumped when the effective preferred assignor
changes, which only happens once a majority of members has switched.

… members rejoin with a different server-side assignor

When all static members of a consumer group using the consumer
protocol leave and rejoin with a different server-side assignor,
the group does not recompute the target assignment. The
`bumpGroupEpoch` flag only considers changes to subscribed topic
names and regex but not the preferred server assignor.

This patch adds a `hasPreferredServerAssignorChanged` check that
compares the effective preferred assignor (falling back to the
default when no member has an explicit preference) before and
after the member update. The group epoch is bumped when the
effective preferred assignor changes, which only happens once a
majority of members has switched.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dajac dajac changed the title KAFKA-20434: Consumer group does not recompute assignment when static members rejoin with a different server-side assignor KAFKA-20434: Consumer group does not recompute assignment when static members rejoin with different assignor Apr 13, 2026
@squah-confluent
Copy link
Copy Markdown
Contributor

Thanks for the patch!

- Move preferredServerAssignorChanged below
  updateRegularExpressionStatus to mirror the bumpGroupEpoch
  sub-expression order
- Use .last instead of .max for epoch comparisons in the
  integration test
- Rewrite test comments to describe intent directly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dajac dajac requested a review from squah-confluent April 13, 2026 11:42
Copy link
Copy Markdown
Contributor

@squah-confluent squah-confluent left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants