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/03/12 02:50:39 UTC
[PR] KAFKA-20291 [2/3]: Implement assignment batching for share groups [kafka]
squah-confluent opened a new pull request, #21721:
URL: https://github.com/apache/kafka/pull/21721
Implement target assignment batching for share groups.
Delay computing the next assignment for share groups until their
assignment interval has elapsed since their last assignment computation
finished.
--
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
Re: [PR] KAFKA-20291 [2/3]: Implement assignment batching for share groups [kafka]
Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac merged PR #21721:
URL: https://github.com/apache/kafka/pull/21721
--
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
Re: [PR] KAFKA-20291 [2/3]: Implement assignment batching for share groups [kafka]
Posted by "squah-confluent (via GitHub)" <gi...@apache.org>.
squah-confluent commented on code in PR #21721:
URL: https://github.com/apache/kafka/pull/21721#discussion_r2929492850
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -2727,9 +2727,15 @@ private CoordinatorResult<Map.Entry<ShareGroupHeartbeatResponseData, Optional<In
member,
updatedMember,
records
- ) || initializedAssignmentPending(group);
+ );
int groupEpoch = group.groupEpoch();
+ if (group.assignmentEpoch() >= groupEpoch) {
+ // A new assignment is needed if no assignment is pending and there are unassigned
+ // initialized partitions.
+ bumpGroupEpoch |= initializedAssignmentPending(group);
+ }
+
Review Comment:
@smjn Could you check if this change is reasonable?
When assignments are delayed, the original code would bump the epoch continuously on every heartbeat. After this change, we only bump the epoch due to `initializedAssignmentPending` when there isn't a pending assignment.
--
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
Re: [PR] KAFKA-20291 [2/3]: Implement assignment batching for share groups [kafka]
Posted by "squah-confluent (via GitHub)" <gi...@apache.org>.
squah-confluent commented on PR #21721:
URL: https://github.com/apache/kafka/pull/21721#issuecomment-4043545982
Depends on #21627. Please ignore the first commit when reviewing.
--
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
Re: [PR] KAFKA-20291 [2/3]: Implement assignment batching for share groups [kafka]
Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #21721:
URL: https://github.com/apache/kafka/pull/21721#discussion_r2939798176
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -2727,9 +2727,15 @@ private CoordinatorResult<Map.Entry<ShareGroupHeartbeatResponseData, Optional<In
member,
updatedMember,
records
- ) || initializedAssignmentPending(group);
+ );
int groupEpoch = group.groupEpoch();
+ if (group.assignmentEpoch() >= groupEpoch) {
+ // A new assignment is needed if no assignment is pending and there are unassigned
+ // initialized partitions.
+ bumpGroupEpoch |= initializedAssignmentPending(group);
+ }
+
Review Comment:
The change looks good, thanks
--
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