dajac commented on code in PR #16898:
URL: https://github.com/apache/kafka/pull/16898#discussion_r1721537884


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -3215,7 +3211,14 @@ public void replay(
         String groupId = key.groupId();
         String memberId = key.memberId();
 
-        ConsumerGroup consumerGroup = 
getOrMaybeCreatePersistedConsumerGroup(groupId, value != null);
+        ConsumerGroup consumerGroup;
+        try {
+            consumerGroup = getOrMaybeCreatePersistedConsumerGroup(groupId, 
value != null);
+        } catch (IllegalStateException ex) {
+            // If the group does not exist and a tombstone is replayed, we can 
ignore it.

Review Comment:
   > To understand with an example: tombstone -> membership changes -> 
compaction: can have tombstones replay first - is this correct?
   
   Yes. The tombstone is replayed first in this case.
   
   > Can a partition really only contain tombstones?
   
   Yes. For instance, when all groups are deleted. However, in this case, we're 
talking about tombstones of one particular consumer 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to