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

eachBatch should respect partition restriction despite concurrency #224

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

Conversation

milindl
Copy link
Contributor

@milindl milindl commented Dec 27, 2024

Fixes #222

Thanks @omer-riv for filing this issue and providing a reproducing case!

Details of the issue:
In the cache, next() "gives up" a partition when it tries to fetch something, and returns empty handed. The message returned to the user in this case is also null.

In the cache, nextN "gives up" partition assignment not only when it returns empty handed, but when we consume to the end of the partition (either leftover size = N or with -1 to consume everything). This is problematic because, we're returning a not-null set of messages to the user but not retaining partition ownership for that user.

Solution: Make nextN like next.

Check the cache test for more details.

@milindl milindl requested a review from emasab December 27, 2024 06:54
@milindl milindl requested review from a team as code owners December 27, 2024 06:54
@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.

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.

EachBatch called on the same partition at the same time
1 participant