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


##########
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:
   Very good point! I think that we should rather use 
`GroupIdNotFoundException` for when the group does not exist and 
`IllegalStateException` when the state is not valid in order to differentiate 
the two cases. Let me fix.



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