Handle pending scheduler pop failures - #492
Open
maum-meliora wants to merge 1 commit into
Open
maum-meliora wants to merge 1 commit into
maum-meliora wants to merge 1 commit into
Conversation
A custom stream scheduler can reject a pending pop. Stop the pass instead of assigning TSNs, consuming rwnd, or initiating resets for an entry that was never removed, and restore the burst budget consumed for the failed chunk while keeping chunks moved earlier in the pass.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #492 +/- ##
==========================================
+ Coverage 85.36% 85.52% +0.16%
==========================================
Files 56 56
Lines 5458 5484 +26
==========================================
+ Hits 4659 4690 +31
+ Misses 561 558 -3
+ Partials 238 236 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JoTurk
reviewed
Sep 10, 2026
JoTurk
left a comment
Member
There was a problem hiding this comment.
sorry forgot to send my pending comment
Comment on lines
+3802
to
+3804
| pendingQueuePopFailed = true | ||
|
|
||
| break |
Member
There was a problem hiding this comment.
This can make writeLoop block forever. Please propagate the error.
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.
Problem
popPendingDataChunksToSendtreatspendingQueue.popas infallible,but the pop is delegated to the stream scheduler policy and can return
an error. When it does, the chunk stays in the pending queue while the
association has already acted as if it left:
it is still in the pending queue, and its length is subtracted from
rwnd;
had its queue entry removed;
same entry is peeked again on the next pass;
entry.
Change
Return whether the pop succeeded and stop the pass when it fails,
before assigning TSNs, consuming rwnd, or queueing a reset. The burst
budget consumed for the failed chunk is restored, chunks moved
successfully earlier in the pass are kept, and the zero window probe is
suppressed for that pass.
The default weighted fair queueing scheduler does not fail this pop, so
this only affects associations using a custom scheduler.
Testing
probe, and reset marker paths: no TSN is assigned, no chunk is sent,
no reset is queued, and the burst budget is restored.
chunk's budget is restored.
go test ./...,go test -race ./..., golangci-lint v2.10.1