Repository navigation
fix(net): keep a quiet track's latest group past rejoin and takeover - #5430
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-splicing a parked track dropped its warm copy, finishing the track and demoting its newest group out of cache protection, while the new upstream copy resumed past that group. Nothing re-sent it, so the cache expired it and a late reader of a quiet track (a catalog published once) got nothing. A takeover between groups lost the finished group the same way, since retire skipped warming it. Keep the warm copy alive and unfinished until the spliced copy delivers a newer group, so the existing rule (a live track's latest group is protected) covers it, and let retire warm a finished held group too. Closes #5413. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Quest outcome: implemented as planned. The Open for the maintainer:
(Written by Claude Opus 5.5) |
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. |
|
Merge summary for
Decisions confirmed by the maintainer:
Review: Codex approved the final head with no findings. CI green except macOS, which auto-merge waits on. (Written by Claude Opus 5.5) |
Closes #5413.
Quest:
quest/m0/release-22/quiet-edge(backport to the 0.17 line;maindeleted this code in #4741).Problem
On
release, the cache exempts only a live track's latest group from expiry. When a parked track re-splices, the front dropped itsWarmCopy. That finished the warm track and demoted its newest group out of protection, whileio.headstill held the group as the live edge. The new upstream copy resumes past that group, so nothing re-sends it, and the pool expires it. A late reader of a quiet track (a catalog published once) then gets nothing.TrackIo::retirereturned early on a finished held group, so a publisher takeover between groups lost it the same way.Fix
Uses the approach settled in the quest plan, not the reporter's
cache::Protectionfallback. Keeping the copy alive was not invasive.TrackIo::priorwith its edge's sequence. The existing rule (a live track's latest group is protected) then covers the edge.TrackIo::hold(used byStep::Heldandbury) releasesprioronce the spliced copy delivers a newer group, so a superseded group still expires.retireno longer skips a finished held group. It warms it the same way, and the following splice moves it intoprior.end, and track removal dropprioras before.Tests
In
rs/moq-net/tests/rejoin.rs, over lite-05/06:rejoined_quiet_catalog_survives_cache_expiry: the reporter's test, lightly restyled.taken_over_quiet_catalog_survives_cache_expiry: the takeover variant. The publisher reconnects while a reader holds the catalog, and the old connection drops.Both check that the late reader gets the catalog after 2x the cache expiry, and that the superseded group expires once a newer one arrives.
Before the fix, both fail with "late reader lost the latest catalog". With only the splice change, the rejoin test passes and the takeover test still fails, so each half is covered.
just check origin/releasepasses.The takeover variant waits 100ms on the paused clock before dropping the old upstream connection. An equal-cost second route changes no announcement, so there is nothing to wait on. The paused clock only advances once every task is idle, so this is deterministic. Without it, lite-06 sometimes dropped the old route before the replacement's announce landed.
Impact
origin.rs.Follow-ups
quest/m0/release-22/quiet-edge.mdand itsRequiredentry inquest/m0/release-22/README.mdonmainonce this merges, as quest: finish the FIRST_OBJECT backport #5075 did for the FIRST_OBJECT backport.maingets its own regression guard viaquest/m1/quiet-edge-test.md. The takeover variant here can port with it.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Need help on this PR? Tag
@codesmith-botwith what you need.