David Jacot created KAFKA-20434:
-----------------------------------
Summary: Consumer group does not recompute assignment when static
members rejoin with a different server-side assignor
Key: KAFKA-20434
URL: https://issues.apache.org/jira/browse/KAFKA-20434
Project: Kafka
Issue Type: Bug
Affects Versions: 4.3.0
Reporter: David Jacot
Assignee: David Jacot
When all static members of a consumer group using the consumer protocol
(KIP-848) leave and rejoin with a different server-side assignor (e.g., from
uniform to range), the group does not recompute the target assignment. The old
assignment is silently returned instead.
The root cause is in GroupMetadataManager.consumerGroupHeartbeat. The
bumpGroupEpoch flag only considers changes to subscribed topic names and
subscribed topic regex. It does not check whether the group's preferred
server-side assignor has changed as a result of the member update. Since the
group epoch is never bumped, the condition groupEpoch > group.assignmentEpoch()
remains false and updateTargetAssignment is never called.
The fix should compare the group's preferred assignor before and after the
member update. The group epoch should be bumped when the preferred (majority)
assignor changes — not when an individual member's preference changes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)