jolshan commented on code in PR #13901: URL: https://github.com/apache/kafka/pull/13901#discussion_r1244482511
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java: ########## @@ -709,14 +780,16 @@ public void replay( String groupId = key.groupId(); String memberId = key.memberId(); + ConsumerGroup consumerGroup = getOrMaybeCreateConsumerGroup(groupId, value != null); + Set<String> oldSubscribedTopicNames = new HashSet<>(consumerGroup.subscribedTopicNames()); + if (value != null) { - ConsumerGroup consumerGroup = getOrMaybeCreateConsumerGroup(groupId, true); ConsumerGroupMember oldMember = consumerGroup.getOrMaybeCreateMember(memberId, true); consumerGroup.updateMember(new ConsumerGroupMember.Builder(oldMember) .updateWith(value) .build()); + updateGroupsByTopics(groupId, oldSubscribedTopicNames, consumerGroup.subscribedTopicNames()); Review Comment: could this and line 803 be outside the if/else? I'm just curious why we moved consumerGroup and old SubscribedTopicNames out. -- 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