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

Fix assignment lost, on illegal generation, during a commit #4908

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

emasab
Copy link
Contributor

@emasab emasab commented Nov 20, 2024

Closes: #4059.

Commits during a rebalance could cause to lose the assignment if the
generation id was bumped by second join group request.
Solved by not rejoining the group in case an illegal generation error happens
during a rebalance.

Happening since v1.6.0.

See this comment for the explanation of the issue:
#4059 (comment)

@emasab emasab requested a review from a team as a code owner November 20, 2024 11:43
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

/* Revoke assignment and rebalance on illegal generation,
* only if not rebalancing, because a new generation id
* can be received soon after this error. */
if (RD_KAFKA_CGRP_REBALANCING(rkcg))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setting rk->rk_cgrp->rkcg_generation_id to -1, even if not initiating a rejoin, was causing an error in next SyncGroup, that was causing the lost assignment.

@airlock-confluentinc airlock-confluentinc bot force-pushed the dev_fix_assignment_lost_on_illegal_generation branch from ca1e90f to 40dc10b Compare December 14, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consumers should not be able to commit during a rebalance
1 participant