Skip to content

Fix bulk acknowledgments for producer-batched messages - #299

Open
davidthorne72 wants to merge 1 commit into
apache:masterfrom
davidthorne72:issue-298-bulk-ack
Open

davidthorne72 wants to merge 1 commit into
apache:masterfrom
davidthorne72:issue-298-bulk-ack

Conversation

@davidthorne72

Copy link
Copy Markdown

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

  • Library builds across netstandard2.0, netstandard2.1, net8.0, net9.0, and net10.0.
  • All 344 tests pass locally with the repository .runsettings. The consumer integration tests use Testcontainers with a Colima socket override on this machine.
  • Scoped whitespace, style, and analyzer verification passes.

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

No deployments
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.

2 participants