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

Race condition between subscribe and stream leading to duplicated records #105

Closed
backuitist opened this issue Mar 28, 2019 · 1 comment · Fixed by #106
Closed

Race condition between subscribe and stream leading to duplicated records #105

backuitist opened this issue Mar 28, 2019 · 1 comment · Fixed by #106

Comments

@backuitist
Copy link
Contributor

When subscribing to a topic the KafkaConsumerActor adds a rebalancing hook that registers FetchRequests.
Then when calling stream the KafkaConsumer will requests partition assignments and - that's the race condition - depending on the timing might get some partition ids for which it will also register FetchRequests.
This is aggravated by the fact that the KafkaConsumerActor.State does not restrict the amount of FetchRequests per (partition, consumer), leading to duplicated records sent downstream.

@vlovgr
Copy link
Contributor

vlovgr commented Mar 28, 2019

Thanks for finding and reporting this @backuitist! I found another related issue, and opened #106 to address this. Would you mind having a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants