squah-confluent commented on code in PR #18224:
URL: https://github.com/apache/kafka/pull/18224#discussion_r1910365690


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/classic/ClassicGroup.java:
##########
@@ -1368,7 +1367,8 @@ public static ClassicGroup fromConsumerGroup(
         );
 
         consumerGroup.members().forEach((memberId, member) -> {
-            if (!memberId.equals(leavingMemberId)) {
+            if (!leavingMembers.contains(member) &&
+                (joiningMember == null || 
!joiningMember.instanceId().equals(member.instanceId()))) {

Review Comment:
   I've added null checks for `ConsumerGroupMember.instanceId()` and 
`ConsumerGroup.staticMember()`. It's safe to call 
`ConsumerGroup.staticMember(null)` since it returns `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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to