Repository navigation
Conversation
…n retry - Track the latest pop with an attemptId of each client and the leases it takes - Release the unacked leases of an attempt on its retry without committing offset, and re-dispatch them - Stop a pop superseded by a newer request, pass on its events and release a lease it takes afterwards - Reject renewing or suspending a released lease - Add unit tests for lease release and recovery
f1amingo
force-pushed
the
fix/lite-attempt-lease-release
branch
from
November 17, 2026 08:31
e685056 to
e7d16f3
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #11529 +/- ##
=============================================
+ Coverage 49.79% 49.99% +0.20%
- Complexity 14419 14496 +77
=============================================
Files 1391 1391
Lines 103381 103494 +113
Branches 13529 13556 +27
=============================================
+ Hits 51477 51742 +265
+ Misses 45684 45518 -166
- Partials 6220 6234 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Which Issue(s) This PR Fixes
Brief Description
When a Lite pop response is lost, the lite topics it read stay leased to it and their events are already consumed, so the client's retry with the same attemptId cannot pick them up until the invisible time expires. This PR records, per client, the latest pop with an attemptId and the leases it takes. A retry of the same attemptId releases these leases without committing offset and re-dispatches them, so they are redelivered from the same offset in order. A pop superseded by a newer request of the client stops reading and passes on its events, and a lease it takes afterwards is released under the queue lock. Receipt handles of a released lease can no longer renew, suspend or commit offset. This assumes at most one pop with an attemptId in flight per client on a broker.
How Did You Test This Change?
Added PopLiteAttemptRecoveryTest and PopLiteMessageProcessorAttemptReleaseTest covering lost responses, overlapping pops and queue lock contention. Existing Lite, ChangeInvisibleTime and ConsumerOrderInfo tests pass.