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

Consumer: fix possible tight loop #693

Merged
merged 1 commit into from
Jul 5, 2016
Merged

Conversation

eapache
Copy link
Contributor

@eapache eapache commented Jul 5, 2016

In certain cases the subscriptionManager and drain loop in abort could start
spinning against each other for a non-trivial amount of time, if e.g. a
partition was suspended waiting for the user to consume its buffer. The tight
loop has always been there, it has just tended to be trivially short in normal
operation so nobody noticed.

This is the same issue that the wait channel was introduced to solve for the
subscriptionConsumer so solve it the same way.

Fixes #692 cc @josselin-c

In certain cases the `subscriptionManager` and drain loop in `abort` could start
spinning against each other for a non-trivial amount of time, if e.g. a
partition was suspended waiting for the user to consume its buffer. The tight
loop has always been there, it has just tended to be trivially short in normal
operation so nobody noticed.

This is the same issue that the `wait` channel was introduced to solve for the
`subscriptionConsumer` so solve it the same way.
@eapache eapache merged commit 15fe77a into master Jul 5, 2016
@eapache eapache deleted the consumer/692-tight-loop branch July 5, 2016 13:15
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.

1 participant