AndrewJSchofield commented on code in PR #20076:
URL: https://github.com/apache/kafka/pull/20076#discussion_r2176877450


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -5671,13 +5671,17 @@ public void replay(
     ) {
         String groupId = key.groupId();
 
-        getOrMaybeCreatePersistedShareGroup(groupId, false);
-
         // Update timeline structures with info about initialized/deleted 
topics.
         if (value == null) {
-            // Tombstone!
-            shareGroupStatePartitionMetadata.remove(groupId);
+            try {
+                getOrMaybeCreatePersistedShareGroup(groupId, false);
+            } catch (GroupIdNotFoundException ex) {
+                // Ignore tombstone if group not found.
+                log.debug("ShareGroupStatePartitionMetadata tombstone for 
non-existent share group {}", groupId, ex);
+            }
+            shareGroupStatePartitionMetadata.remove(groupId);   // Should not 
throw any exceptions.
         } else {
+            getOrMaybeCreatePersistedShareGroup(groupId, false);

Review Comment:
   I think this should be `true` for the `createIfNotExists` argument. That's 
the pattern that the other replay methods use and I can't think of a reason why 
this one would be different.



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