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


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java:
##########
@@ -256,7 +263,7 @@ private OffsetAndMetadata remove(
             if (partitionOffsets.isEmpty())
                 topicOffsets.remove(topic);
 
-            if (topicOffsets.isEmpty())
+            if (!preserveGroups && topicOffsets.isEmpty())
                 offsetsByGroup.remove(groupId);

Review Comment:
   I guess we could. It depends on whether we are trying to track whether a 
group has an open transaction with offset commits that will take effect when 
committed or whether a group has an open transaction at all.
   
   We certainly shouldn't delete groups with uncommitted offsets, since they 
could be committed afterwards and would then not get cleaned up. I'm just not 
sure about groups with deleted uncommitted offsets that are a no-op when 
committed.
   
   @dajac What should we be doing in the second case?



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