gabriellefu commented on code in PR #23088:
URL: https://github.com/apache/kafka/pull/23088#discussion_r3772104967


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/assignor/AssignmentConfigsImpl.java:
##########
@@ -70,6 +71,21 @@ public static AssignmentConfigsImpl fromMap(Map<String, 
String> configs) {
         );
     }
 
+    /**
+     * Converts these configs into the map recorded for the group, which 
{@link #fromMap} reads back.
+     * The map keeps the shape older brokers record, or a rolling upgrade 
reads it as a config change.
+     */
+    public Map<String, String> toMap() {
+        Map<String, String> configs = new TreeMap<>();
+        // Written unconditionally, like 4.2 and 4.3 do.
+        configs.put(NUM_STANDBY_REPLICAS_CONFIG, 
String.valueOf(numStandbyReplicas));
+        // Configs added later are omitted at their default value, like the 
brokers that predate them.
+        if 
(!rackAwareAssignmentTags.equals(DEFAULT.rackAwareAssignmentTags())) {

Review Comment:
   only if rackAwareAssignmentTags is not default we write them into 
__consumer_offset, so does future config if we added any



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

Reply via email to