Repository navigation
Fix bulk acknowledgments for producer-batched messages - #299
Open
davidthorne72 wants to merge 1 commit into
Open
davidthorne72 wants to merge 1 commit into
davidthorne72 wants to merge 1 commit into
Conversation
Process every message ID in an individual bulk ACK so incomplete producer batches do not suppress independent acknowledgments. Cover mixed, complete, partial, empty and unbatched requests with unit tests. Refs apache#298
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partially addresses #298. This PR fixes bulk-ACK correctness; the linked-list batch-tracker contention described in the issue remains for a follow-up change.
Description
Process every message ID in an individual bulk ACK. Incomplete producer batches no longer prevent independent IDs from being sent, and a complete producer batch is sent as one enclosing-batch ACK. Compact ready IDs in place before sending; preserve the existing single-ID and cumulative paths. Empty bulk ACKs are a no-op.
Regression
Before the fix, the new tests fail because an incomplete first batched ID suppresses all later IDs, or batched IDs after an unbatched first ID bypass batch tracking. They cover complete batches, mixed batched/unbatched orders, unbatched-only requests, empty requests, and delayed completion of a partial batch.
Testing