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

Bugfix: Exception from consumer.pause() in rebalance due to passing already revoked partition #88

Merged
merged 2 commits into from
Feb 8, 2021

Conversation

kawamuray
Copy link
Contributor

In current implementation the consumer.pause() may throw IllegalStateException: No current assignment for partition ....

When rebalance occurs, we save the list of partitions and restore the pause state later. However, since the rebalance might have taken over some partitions off from this instance, we have to filter these partitions from the argument of consumer.pause().
So this happens when all the following 3 conditions are met:

  • There’s a paused partition
  • Trigger rebalance (instance failure, restart)
  • Rebalance taken over a partition from the current instance

@kawamuray kawamuray added the bugfix Fix a bug label Feb 8, 2021
@kawamuray kawamuray requested a review from ocadaruma February 8, 2021 07:03
@kawamuray kawamuray changed the title Pause rebalance bug Bugfix: Exception from consumer.pause() in rebalance due to passing already revoked partition Feb 8, 2021
Copy link
Contributor

@ocadaruma ocadaruma left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks for quick fix

@ocadaruma ocadaruma merged commit 87e3689 into line:master Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants