jolshan commented on code in PR #13901: URL: https://github.com/apache/kafka/pull/13901#discussion_r1247163837
########## group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java: ########## @@ -172,19 +186,21 @@ public List<Record> build(TopicsImage topicsImage) { }); // Add subscription metadata. - Map<String, TopicMetadata> subscriptionMetadata = new HashMap<>(); - members.forEach((memberId, member) -> { - member.subscribedTopicNames().forEach(topicName -> { - TopicImage topicImage = topicsImage.getTopic(topicName); - if (topicImage != null) { - subscriptionMetadata.put(topicName, new TopicMetadata( - topicImage.id(), - topicImage.name(), - topicImage.partitions().size() - )); - } + if (subscriptionMetadata == null) { Review Comment: If subscriptionMetadata is not null, that means we just want to take what we are already given and not generate it based on the subscribedNames and the image? Is this done to optimize or are there cases where we want to have something different than what we would have generated? -- 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