dajac commented on code in PR #24023:
URL: https://github.com/apache/kafka/pull/24023#discussion_r4626967722


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -2863,7 +2866,10 @@ private CoordinatorResult<Void, CoordinatorRecord> 
classicGroupJoinToConsumerGro
             records
         );
 
-        boolean bumpGroupEpoch = hasMemberSubscriptionChanged || 
updateRegularExpressionStatus.regexUpdated();
+        boolean hasRackIdChanged = !Objects.equals(member.rackId(), 
updatedMember.rackId());
+        boolean bumpGroupEpoch = hasMemberSubscriptionChanged ||
+            updateRegularExpressionStatus.regexUpdated() ||
+            hasRackIdChanged;

Review Comment:
   nit: `bumpGroupEpoch` is passed to `maybeReconcile` as 
`hasSubscriptionChanged` further down, in the non-downgrade branch. With this 
change, it is also true when only the rack id has changed. It is harmless but 
it is not accurate anymore. Could we keep them separate, like in 
`consumerGroupHeartbeat`?
   
   ```java
   boolean hasSubscriptionChanged = hasMemberSubscriptionChanged ||
       updateRegularExpressionStatus.regexUpdated();
   boolean bumpGroupEpoch = hasSubscriptionChanged || hasRackIdChanged;
   ```
   
   We can then pass `hasSubscriptionChanged` to `maybeReconcile`.
   



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