You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lucasbru (via GitHub)" <gi...@apache.org> on 2026/09/28 11:05:26 UTC

Re: [PR] KAFKA-20790: Follow up, avoid translation of assignmentconfig and make the output type unmodifiable [kafka]

lucasbru commented on code in PR #23165:
URL: https://github.com/apache/kafka/pull/23165#discussion_r4121387030


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -6235,16 +6233,19 @@ public void replay(
             streamsGroup.setStoredDescriptionTopologyEpoch(value.storedDescriptionTopologyEpoch());
             streamsGroup.setFailedDescriptionTopologyEpoch(value.failedDescriptionTopologyEpoch());
 
-            if (value.lastAssignmentConfigs() != null) {
-                streamsGroup.setLastAssignmentConfigs(
+            // A record without configs (written before they were persisted, or re-persisting such a state) leaves
+            // them unrecorded. The next heartbeat then compares the effective configs against the defaults, so it
+            // only rebalances the group if any effective config differs from its default.
+            if (value.lastAssignmentConfigs() == null || value.lastAssignmentConfigs().isEmpty()) {
+                streamsGroup.setLastAssignmentConfigs(Optional.empty());

Review Comment:
   I agree with this comment. Let's drop the optional and just refer to DEFAULT if it's null.



-- 
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