You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dajac (via GitHub)" <gi...@apache.org> on 2024/08/19 14:23:47 UTC

[PR] MINOR: Update `getOrMaybeCreateClassicGroup` to only throw GroupIdNotFoundException [kafka]

dajac opened a new pull request, #16919:
URL: https://github.com/apache/kafka/pull/16919

   This patch updates `getOrMaybeCreateClassicGroup` to only throw `GroupIdNotFoundException` as we did for other internal methods. The called is responsible to translate the error to the appropriate one. There is only one case.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Update `getOrMaybeCreateClassicGroup` to only throw GroupIdNotFoundException [kafka]

Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac merged PR #16919:
URL: https://github.com/apache/kafka/pull/16919


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Update `getOrMaybeCreateClassicGroup` to only throw GroupIdNotFoundException [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #16919:
URL: https://github.com/apache/kafka/pull/16919#issuecomment-2297454204

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


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Update `getOrMaybeCreateClassicGroup` to only throw GroupIdNotFoundException [kafka]

Posted by "dajac (via GitHub)" <gi...@apache.org>.
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org