gabriellefu commented on code in PR #23165:
URL: https://github.com/apache/kafka/pull/23165#discussion_r4187505093
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -2268,9 +2266,10 @@ private CoordinatorResult<StreamsGroupHeartbeatResult,
CoordinatorRecord> stream
assignmentUpdate = AssignmentUpdate.RECOMPUTE;
}
- // Check if assignment configurations have changed
- Map<String, String> currentAssignmentConfigs =
streamsGroupAssignmentConfigs(groupId);
- Map<String, String> storedAssignmentConfigs =
group.lastAssignmentConfigs();
+ // Check if assignment configurations have changed. A group with no
recorded configs holds the defaults,
+ // so upgrading the broker does not rebalance every group that has
nothing configured.
+ AssignmentConfigsImpl currentAssignmentConfigs =
streamsGroupAssignmentConfigs(groupId);
+ AssignmentConfigsImpl storedAssignmentConfigs =
group.lastAssignmentConfigs();
if (assignmentUpdate == AssignmentUpdate.NONE &&
!currentAssignmentConfigs.equals(storedAssignmentConfigs)) {
Review Comment:
good point, in that case it will still rebalancing once since the standby
was customized before the config key exist. In this case I think we can't
actually tell "unchanged" and "changed during upgrade" apart. I can change the
comment to avoid misleading, but I think one time rebalancing is unavoidable.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]