Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-14201; Consumer should not send group instance ID if committing with empty member ID (client side) #12599

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

dajac
Copy link
Contributor

@dajac dajac commented Sep 7, 2022

The consumer group instance ID is used to support a notion of "static" consumer groups. The idea is to be able to identify the same group instance across restarts so that a rebalance is not needed. However, if the user sets group.instance.id in the consumer configuration, but uses "simple" assignment with assign(), then the instance ID nevertheless is sent in the OffsetCommit request to the coordinator. This may result in a surprising UNKNOWN_MEMBER_ID error.

This PR fixes the issue on the client side by not setting the group instance id if the member id is empty (no generation).

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@dajac dajac changed the title KAFKA-14201; Consumer should not send group instance ID if committing with empty member ID KAFKA-14201; Consumer should not send group instance ID if committing with empty member ID (client side) Sep 7, 2022
@hachikuji
Copy link
Contributor

Thanks, I was a little hesitant about the client-side fix since I thought there might be a debugging benefit of having group instance ID in request logs. But I guess this speculative benefit is probably small compared to the cost of seeing the regression in behavior because of the additional validation.

Copy link
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hachikuji hachikuji merged commit b7f20be into apache:trunk Sep 8, 2022
hachikuji pushed a commit that referenced this pull request Sep 8, 2022
… with empty member ID (#12599)

The consumer group instance ID is used to support a notion of "static" consumer groups. The idea is to be able to identify the same group instance across restarts so that a rebalance is not needed. However, if the user sets `group.instance.id` in the consumer configuration, but uses "simple" assignment with `assign()`, then the instance ID nevertheless is sent in the OffsetCommit request to the coordinator. This may result in a surprising UNKNOWN_MEMBER_ID error.

This PR fixes the issue on the client side by not setting the group instance id if the member id is empty (no generation).

Reviewers: Jason Gustafson <jason@confluent.io>
@dajac dajac deleted the KAFKA-14201-2 branch September 9, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants