KAFKA-6773; Allow offset commit/fetch/describe with empty groupId#4851
KAFKA-6773; Allow offset commit/fetch/describe with empty groupId#4851hachikuji merged 6 commits intoapache:trunkfrom
Conversation
ijuma
left a comment
There was a problem hiding this comment.
LGTM, just a couple of minor comments.
| val groupId = "" | ||
|
|
||
| val commitOffsetResult = commitOffsets(groupId, OffsetCommitRequest.DEFAULT_MEMBER_ID, | ||
| OffsetCommitRequest.DEFAULT_GENERATION_ID, immutable.Map(tp -> offset)) |
There was a problem hiding this comment.
I think it's because we import scala.collection._. Will try to fix.
There was a problem hiding this comment.
Makes sense. You can leave it as is, I was just curious.
|
|
||
| private def validateGroup(groupId: String): Option[Errors] = { | ||
| if (!validGroupId(groupId)) | ||
| private def validateNonEmptyGroupStatus(groupId: String): Option[Errors] = { |
There was a problem hiding this comment.
Can we add a comment saying that this is only used by commit and fetch and why?
|
@ijuma Thanks, you should probably take another look before I merge since I changed a few things. I had initially not allowed support for the empty group id in DeleteGroups. |
ijuma
left a comment
There was a problem hiding this comment.
Just a trivial comment, LGTM (no need for re-review).
|
|
||
| @Test | ||
| def testCommitAndFetchOffsetsWithEmptyGroup() { | ||
| // For backwards compatibility, the coordinator supports committing/fetching offsets with an empty groupId |
There was a problem hiding this comment.
Do you want to mention the reason for describe/delete group in the test as well?
…pId (apache#4851) We had a regression in apache#4788 which caused the offset commit/fetch/describe APIs to fail if the groupId was empty. This should be allowed for backwards compatibility. Additionally, I have modified DeleteGroups to allow removal of the empty group, which was missed in the initial implementation. I've added a test case to ensure that we do not miss this again in the future. Reviewers: Ismael Juma <ismael@juma.me.uk>
…pId (apache#4851) We had a regression in apache#4788 which caused the offset commit/fetch/describe APIs to fail if the groupId was empty. This should be allowed for backwards compatibility. Additionally, I have modified DeleteGroups to allow removal of the empty group, which was missed in the initial implementation. I've added a test case to ensure that we do not miss this again in the future. Reviewers: Ismael Juma <ismael@juma.me.uk>
…pId (apache#4851) We had a regression in apache#4788 which caused the offset commit/fetch/describe APIs to fail if the groupId was empty. This should be allowed for backwards compatibility. Additionally, I have modified DeleteGroups to allow removal of the empty group, which was missed in the initial implementation. I've added a test case to ensure that we do not miss this again in the future. Reviewers: Ismael Juma <ismael@juma.me.uk>
…pId (apache#4851) We had a regression in apache#4788 which caused the offset commit/fetch/describe APIs to fail if the groupId was empty. This should be allowed for backwards compatibility. Additionally, I have modified DeleteGroups to allow removal of the empty group, which was missed in the initial implementation. I've added a test case to ensure that we do not miss this again in the future. Reviewers: Ismael Juma <ismael@juma.me.uk>
We had a regression in #4788 which caused the offset commit/fetch/describe APIs to fail if the groupId was empty. This should be allowed for backwards compatibility. I've added a test case to ensure that we do not miss this again in the future.
Committer Checklist (excluded from commit message)