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

kgo: fix accounting when topics/partitions are {,un}paused for PollRecords #882

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

twmb
Copy link
Owner

@twmb twmb commented Jan 8, 2025

Topics or partitions that were paused (in takeNBuffered specifically, which is used by PollRecords) did not have proper accounting for stripped (removed) topics or partitions. PollFetches does not have this problem because the logic is different -- we build a big fetch, call our accounting logic, and then remove the stripped topics & partitions. Instead in takeNBuffered, we skip topics and partitions as we build a fetch and then once the fetch is built, do the accounting.

The fix is to build a separate internal-only fetch of everything that was stripped and pass that to our accounting hooks.

Fixes #865.

…cords

Topics or partitions that were paused (in `takeNBuffered` specifically,
which is used by PollRecords) did not have proper accounting for
stripped (removed) topics or partitions. PollFetches does not have this
problem because the logic is different -- we build a big fetch, call our
accounting logic, and then remove the stripped topics & partitions.
Instead in takeNBuffered, we skip topics and partitions as we build a
fetch and then once the fetch is built, do the accounting.

The fix is to build a separate internal-only fetch of everything that
was stripped and pass that to our accounting hooks.

Fixes #865.
@twmb twmb changed the title kgo: fix accounting when topics/partitions are {,un}paused for PollRe… kgo: fix accounting when topics/partitions are {,un}paused for PollRecords Jan 8, 2025
@twmb twmb added the patch label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Value for BufferedFetchRecords When Pausing/Resuming
1 participant