Conversation
kAutoRequestID is a sentinel RequestID (max uint64) that callers can pass in a JoiningFetch to let the session find the matching subscribe by track name rather than requiring the caller to track the request ID manually. resolveJoiningFetch handles both the auto case (searches pendingRequests_ and subTracks_ by FullTrackName, writes back the resolved ID) and the explicit case (existing lookup + validation), replacing the inline block in MoQSession::fetch with a single call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary: Adds a `passive` flag to addChannelSubscriber() for the relay's own internal observer chain (top-N / termination / cache) attached below a local-forwarder primary. Passive subscribers are not real downstream consumers, so they must not influence the forwarder's "are there active consumers" accounting: - They increment passiveCount_ instead of calling addForwardingSubscriber(), so they don't count toward forwardingSubscribers_ or block onEmpty. The primary's onEmpty still fires once the last real cross-exec subscriber leaves. - In beginSubgroup(), resetting a passive subscriber's stale subgroup no longer sets anyReset. Passive subscribers never stop_sending, so counting them would mask the "no active consumers" signal and prevent a duplicate subgroup from propagating CANCELLED back to the publisher after all real consumers have stop_sent. Test Plan:
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.
Adds a
passiveflag to addChannelSubscriber() for the relay's owninternal observer chain (top-N / termination / cache) attached below a
local-forwarder primary. Passive subscribers are not real downstream
consumers, so they must not influence the forwarder's "are there active
consumers" accounting:
so they don't count toward forwardingSubscribers_ or block onEmpty. The
primary's onEmpty still fires once the last real cross-exec subscriber
leaves.
longer sets anyReset. Passive subscribers never stop_sending, so counting
them would mask the "no active consumers" signal and prevent a duplicate
subgroup from propagating CANCELLED back to the publisher after all real
consumers have stop_sent.
This change is