You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "squah-confluent (via GitHub)" <gi...@apache.org> on 2026/02/23 21:20:39 UTC
Re: [PR] KAKFA-20066: Implement KIP-1251: Assignment epochs for consumer groups [1/N] [kafka]
squah-confluent commented on code in PR #21557:
URL: https://github.com/apache/kafka/pull/21557#discussion_r2843139477
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -2828,7 +2828,7 @@ private CoordinatorResult<Map.Entry<ShareGroupHeartbeatResponseData, Optional<In
// (subscribedTopicNames) to detect a full request as those must be set in a full request.
// 2. The member's assignment has been updated.
boolean isFullRequest = subscribedTopicNames != null;
- if (memberEpoch == 0 || isFullRequest || hasAssignedPartitionsChanged(member, updatedMember)) {
+ if (memberEpoch == 0 || isFullRequest || ShareGroupMember.hasAssignedPartitionsChanged(member, updatedMember)) {
Review Comment:
For symmetry, could we also qualify the `hasAssignedPartitionsChanged` call in `consumerGroupHeartbeat`?
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/share/ShareGroupMember.java:
##########
@@ -190,9 +190,31 @@ private ShareGroupMember(
clientId,
clientHost,
subscribedTopicNames,
- state,
- assignedPartitions
+ state
);
+ this.assignedPartitions = assignedPartitions;
+ }
+
+ /**
+ * The partitions assigned to this member.
+ */
+ private final Map<Uuid, Set<Integer>> assignedPartitions;
Review Comment:
I think this declaration belongs in between the builder and constructor, like in `ConsumerGroupMember`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org