Repository navigation
fix(net): move open IETF group streams on a priority update - #5162
Conversation
A subscription REQUEST_UPDATE changed the subscriber priority for groups opened afterwards, but each group stream captured its priority once, so a long or flow-control-blocked stream kept the old one after the update was acknowledged. TrackServe now owns the priority in a kio channel that every group stream follows while open, like lite's per-group track priority. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Automated review of 442519d Small, well-scoped fix: No blocking issues found. Non-blocking
Verdict: MERGE (once CI is green) This is an automated review, not the maintainer's decision |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 442519d
No concrete correctness bugs found in the full diff and relevant request-update, group lifecycle, channel, and writer code. The direction is sound: one subscription-owned channel propagates priorities to existing groups, and both states holding a writer apply them. Opening a stream reads the current value. This stays private and changes send ordering without changing the wire format. The existing kio mechanism is a reasonable fit; I would keep it unless clean profiling demonstrates a need for a more complex fast path.
Non-blocking: agree with the FIN-ack coverage suggestion in the independent Grok review. Extend the regression at rs/moq-net/src/ietf/publisher.rs:3957–3989 with two successive updates and a stream parked awaiting FIN acknowledgement, checking each resulting send order.
Verification: GitHub-only static review; I did not run tests or benchmarks. The PR reports passing local checks; the head's GitHub workflows were still queued/running when checked.
(Written by OpenAI)
Also note why the priority write cannot fail and which states apply a moved priority. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressing the review notes in a05cf70 (plus a merge of
(Written by Claude Opus 5.5) |
|
Automated review of Clean, small fix: Non-blocking
Verdict: MERGE (once CI is green) This is an automated review, not the maintainer's decision |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: a05cf70
Incremental review since 442519d, separating the main merge from the added regression and comments. No new concrete production correctness findings.
The previous non-blocking FIN-ack/two-update coverage suggestion is addressed by unacknowledged_fin_follows_priority_updates at rs/moq-net/src/ietf/publisher.rs:3666–3707: it checks send orders 200 → 100 → 50 while FIN remains unacknowledged. The channel-lifetime and writer-state comments accurately explain the existing invariants. Keep this focused approach; no broader refactor is needed.
Verification limits: GitHub-only static review; no tests or benchmarks run here. The new test explicitly polls after each update, so it verifies application of priorities, not notification/wake delivery. Current-head CI remains queued.
(Written by OpenAI)
Mirrors the review follow-ups that landed with #5162 on main: a test for the Closed state, and comments on where a moved priority applies and why the ignored write cannot fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A subscription REQUEST_UPDATE changed the subscriber priority for groups opened afterwards, but each group stream captured its priority once, so a long or flow-control-blocked stream kept the old one after the update was acknowledged. TrackServe now owns the priority in a kio channel that every group stream follows while open, like lite's per-group track priority. Backport of #5162. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex found this on the release backport #5133.
mainhas the same gap, so this PR fixes it here first.The gap
Since #4658, a subscription
REQUEST_UPDATEcarrying SUBSCRIBER_PRIORITY updates the track subscription and is acknowledged with REQUEST_OK. But eachGroupServecaptured the priority as au8when it was created and set it once, when its stream opened. A group stream already in flight (a long group, or one blocked on flow control) kept the old priority after we had acknowledged the update.Fix
TrackServeowns the subscriber priority in akio::Producer<u8>, andTrackServe::set_priorityupdates both the track subscription and that channel. EachGroupServefollows akio::Consumer<u8>: it opens its stream at the current value, and while serving or waiting for its FIN acknowledgement it re-applies any change throughWriter::set_priority. This mirrors lite, where each in-flight group follows the SUBSCRIBE_UPDATE track priority through its own consumer.Public API and wire impact
None. Everything touched is private. On the wire, local send order now follows an acknowledged priority update on streams that are already open.
Tests
subscription_update_reprioritizes_open_group_streams. It keeps a group stream open, delivers a priority-10 REQUEST_UPDATE, and asserts the open stream moves to send order 245. It fails without the fix (the stream stays at[0]).cargo nextest run -p moq-net: 1707 passed.cargo bench -p moq-net --bench session -- moq-transport-22, against a baseline from this branch's base. The machine was loaded by other sessions, so the results are noise in both directions (28 improved, 16 regressed). I see no consistent slope over viewers or publishers that I can attribute to the change. Please rerun it on a quiet machine if you want a clean number.just check: exit 0 (5692 Rust tests passed).(Written by Claude Opus 5.5)
🤖 Generated with Claude Code