Repository navigation
test(net): benchmark range filling; scope fetch as a range - #6722
Conversation
Quest-Claim: d9a528edd5ea470a
track_range_filling drains one reader's disjoint ranges below the feed's start through fills, swept over how many ranges and how many groups each spans: the filling counterpart of track_range_serving. It shows the per group cost growing with both axes. The fetch-range quest is rewritten to what remains: wire publishers keep parking on a bounded downstream SUBSCRIBE, route recovery keeps its frame-start fetch, and three open questions (a miss with no feed frontier, cached backfill, relay demand before lite-07) plus the fill path's slope block replacing fetch_group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 3df5d0d
No actionable bugs found. The benchmark separates range count from span, excludes fixture setup from timing, and verifies expected delivered-group count. Limiting this PR to measurement and documenting fetch migration prerequisites is sensible; it avoids prematurely changing API or wire behavior.
Verification: static inspection of changes and relevant fill/benchmark code. No tests or benchmarks run; reported performance numbers were not independently reproduced.
|
No actionable comments were generated in the recent review.
|
|
Landing 3df5d0d. Changes since the draft:
The OpenAI and CodeRabbit reviews of this head found nothing actionable. (Written by Claude Opus 5.5) |
…s it Per #6722's decision that fetch-range waits on a linear fill path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quest:
quest/m1/subscribe-ranges/fetch-range.mdSummary
The overnight attempt stopped before replacing
fetch_group. Probing the model turned up three behavior gaps that would break today's fetch callers. This PR lands only the requested benchmark and rewrites the quest to what remains, with the maintainer's decisions below recorded in its Plan.track_range_filling(rs/moq-net/benches/track.rs): one reader fills R disjoint ranges of S groups each, all below the feed's start. It is the filling counterpart oftrack_range_serving.quest/m1/subscribe-ranges/fill-linear.md, planned in moq-dev/moq#6790).Findings
Both gaps were reproduced with throwaway unit tests, which are not committed:
No feed frontier means no fill. On a track with no live feed (the moq-archive reader, or a relay copy no subscription feeds), a reader with
Range::groups(5..6)parks forever and never asks a fill. A miss only counts below the newest group the feed produced (decision 2 on moq-dev/moq#6123).fetch_groupqueues a one-group fill instead.Cached backfill is invisible to range readers. One reader's fill caches group 0. A second
0..1reader then parks with no fill asked: the arrival walk skips backfill, and the miss judge counts it as already held.fetch_groupreads it straight from the cache.Relay demand changes on the wire. A one-range read's ranges join the track's aggregate. A relay would then put a bounded SUBSCRIBE upstream where it puts a FETCH today.
fetch_only.rsasserts that a moq-transport fetch never subscribes, and a lite SUBSCRIBE before lite-05 cannot name a missing group.The fill path is superlinear. Groups/s over range count (columns) and span (rows):
Two things drive it. Each poll's drift edge (
live_edge) and each candidate's successor search (arrival/successor) walklookupacross the reader's runs, and a filled group is never "shown", so every scan passes all of it.Misses::retainalso rescans every filled group on each poll. Makingretainincremental alone helped only at 16 ranges, so it is left out.Decisions (maintainer, 2026-10-25)
fetched_backfill_not_subscribedandrefilled_sequence_stays_out_of_subscriptions.fill-linear.md, planned in moq-dev/moq#6790. That file is not on main yet, so the quest's Plan names the dependency in text; list it under Required once it lands. RecommendedChoices made (recorded in the quest)
recv_groupends a bounded read. Today the lite subscriber treats an upstream FIN as the track's end, relying on "bounded downstream demand alone never FINs". If the publishers FIN instead, a peer on a published version reads the range's end as the track's end.resume::Recoverfetches the rest of a group from frame N, which a whole-group range cannot express, so a crate-private fetch stays for it.Public API and wire impact
None. The PR adds a benchmark and edits a quest.
Checks
just check: passed (moq-net, 3201 tests).cargo clippy -p moq-net --benches: clean.cargo bench -p moq-net --bench track -- --test track_range_filling: passed. The numbers above come from a short measured run.quest check: ok.cargo clippy -p moq-net --benches -- -D warningsclean, andtrack_range_fillingpasses in test mode.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code