dongnuo123 commented on code in PR #15546:
URL: https://github.com/apache/kafka/pull/15546#discussion_r1530392822


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -598,15 +600,16 @@ public List<DescribeGroupsResponseData.DescribedGroup> 
describeGroups(
      */
     ConsumerGroup getOrMaybeCreateConsumerGroup(
         String groupId,
-        boolean createIfNotExists
+        boolean createIfNotExists,
+        List<Record> records
     ) throws GroupIdNotFoundException {
         Group group = groups.get(groupId);
 
         if (group == null && !createIfNotExists) {
             throw new GroupIdNotFoundException(String.format("Consumer group 
%s not found.", groupId));
         }
 
-        if (group == null) {
+        if (group == null || maybeDeleteEmptyClassicGroup(group, records)) {

Review Comment:
   Oh thanks for the catch. Yeah it's necessary when the group is an empty 
classic group



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