dajac commented on PR #16919:
URL: https://github.com/apache/kafka/pull/16919#issuecomment-2298058592

   > > This patch updates getOrMaybeCreateClassicGroup to only throw 
GroupIdNotFoundException as we did for other internal methods.
   > 
   > Pardon me, I fail to get the context. why 
`getOrMaybeCreatePersistedShareGroup` and 
`getOrMaybeCreatePersistedConsumerGroup` throw `IllegalStateException` rather 
than `GroupIdNotFoundException`?
   
   `getOrMaybeCreatePersistedShareGroup` and 
`getOrMaybeCreatePersistedConsumerGroup` are only used in the `replay` methods. 
In this context, using an `IllegalStateException` makes sense because the state 
is indeed illegal if we replay a record and we don't have the required state in 
place. We could also use `GroupIdNotFoundException` in those two. It does not 
make a big difference in the end.
   
   `getOrMaybeCreateShareGroup` and `getOrMaybeCreateConsumerGroup` are used in 
other paths and they both use `GroupIdNotFoundException` like 
`getOrMaybeCreateClassicGroup`.


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