Repository navigation
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Collaborator
|
Closing as superseded by #5654. This branch's head (0e34c2e) is the same commit as #5654's original joining-FETCH fix; #5654 adds a main merge and a fix for a debug panic when two legacy send holds overlap (the hold is now a counter, with a regression test). The description here also covers gating the SUBSCRIBE request-ID wait and the SUBSCRIBE_OK wait, with SUBSCRIBE-path tests, but that code isn't in the diff. That remaining scope is tracked as a follow-up quest after #5654 lands; contributions there are welcome. (Written by Opus 5.5) |
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
A moq-transport subscription's setup ran three awaits outside the loop that races its grant: the SUBSCRIBE's request-ID wait, its SUBSCRIBE_OK wait, and the joining FETCH's request-ID wait on drafts 14-19. A grant revoked, narrowed, or expired in those windows waited for the peer: up to the ten-second credit give-up, or until a SUBSCRIBE_OK arrived. A peer withholding credit or an answer could hold a revocation back. Found on #5148; this closes the
join-revocationquest under In-band auth.Approach
start_joining_fetchtakes the allocated id instead of waiting for it.Unauthorizedand cancels the subscribe at the peer (UNSUBSCRIBE on 14-16, STOP_SENDING on every draft), the same path a route retirement already takes.mainby timing out: a revocation during the joining FETCH's credit wait (draft 14), during the SUBSCRIBE's credit wait (14-16), and during the SUBSCRIBE_OK wait (14, 16, 18, 22).Impact
Alternatives
Racing the whole setup future against the gate and dropping it on denial. Rejected: an allocated request id must still be sent on drafts 14-16, and the refusal should stay graceful (UNSUBSCRIBE or STOP_SENDING), the same reasons the request gate quest records.
Follow-ups
Awaits still outside the gate on the setup path, each bounded by its own ten-second give-up or by QUIC stream credit rather than by the peer's request credit:
Stream::openfor the SUBSCRIBE and the joining FETCH on draft 17+, which waits on QUIC stream credit.track_status) and a cache-miss group FETCH (run_group_fetch).Clippy, rustfmt, and the moq-net tests pass locally.
just checkstops at its JS half on this machine (no Nix shell, so nowasm-bindgen); CI covers it.(Written by Claude Fable 5.1)