Repository navigation
fix(relay): share connection lifecycle across runtimes - #5761
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
|
Implemented and validated on clean head Nix format/fix and strict full check passed. The strict real ring suite and supervision-panic regression passed 11/11; native interop and relay close accounting passed. Left as a draft for review. No public API or wire change. (written by GPT-6) |
…tion-log # Conflicts: # quest/m2/uring-connection-log.md
A worker stopped at the end of a drain dropped the task that would log a still-draining session's close. Hand supervision and its close to the shared runtime once the worker's half starts the session, and cover a drain with sessions open in the ring log test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe change moves connection admission, supervision, and close logging into a shared Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
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. |
…tion-log Route #5659's refusal accounting through the shared Lifecycle: cluster admission records its own refusals, and Lifecycle::admit records the LAN and drain refusals for both runtimes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion-log # Conflicts: # quest/m2/README.md
…tion-log Thread the ring's Lifecycle through #5821's split handshake: serve_request takes it in place of the connection id and returns the boxed supervision, so both the moq-lite and moq-transport paths hand the close to the shared runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
The io_uring relay duplicates admission and supervision and logs under
moq_relay::uring, outside the interop harness's connection filter. A supervision panic loses its close log entirely.Approach
Use one private lifecycle owner (
connection::Lifecycle) for admission (including LAN credentials and refusals), the connection span, negotiated logging, supervision and the close line. Carry that span across worker and shared-runtime tasks. Transport handshakes and request configuration remain with their concrete accept paths so the ring driver stays on its worker.On the ring, the worker runs its half (handshake, admission on the shared runtime, session start) and logs the close itself only if that half fails or panics. Once the session starts, its supervision and its close move to the shared runtime, like the tokio path: a worker stopped at the end of a drain drops its tasks, so a close logged there could be lost.
Impact
moq_relay::connectionin the sameconn{id=N}span, and every close comes fromLifecycle.Alternatives
Iteration
main, which links each crate's integration tests into one binary (test: link each crate's integration tests into one binary #5689). The log capture moved totests/integration/logs.rs, a module of that binary.Lifecycle::startas the ring's entry point.connspan construction.mainagain after feat(stats): count refused and failed sessions #5659 (session outcomes) and Migrate network timing onto moq-clock #5681 (moq_clock). feat(stats): count refused and failed sessions #5659's refusal accounting now runs throughLifecycle::admiton both runtimes: cluster admission records its own refusals, andLifecyclerecords the LAN and drain refusals. SETUP failures use feat(stats): count refused and failed sessions #5659's sharedsetup_failedon each accept path, and session-end failures stay in the sharedsupervise.mainafter feat(relay): serve moq-transport from the io_uring workers #5821 (moq-transport on the ring), which split the ring handshake into a moq-lite and a boxed moq-transport path.serve_requesttakes theLifecyclein place of the connection id and returns a boxed supervision future, so both paths hand the close to the shared runtime.Decisions settled by the iterating agent (recommended option taken):
Lifecycle::runas the tokio path. Survives worker teardown.Validation
On
857360d48:just checkagainstmain(Nix): passed, including 570 default tests and the io_uring clippy.MOQ_STRICT=1 cargo nextest run -p moq-relay --features moq-relay/io-uring --tests: 396 passed, including feat(stats): count refused and failed sessions #5659's ring refusal test and feat(relay): serve moq-transport from the io_uring workers #5821's every-version test.uring_sessions_log_their_close_under_a_connection_span,uring_refusals_reach_metricsanduring_workers_serve_every_configured_version: 10/10. Before the drain fix, the log test failed 3/10.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)