Repository navigation
feat(mesh): request bounded single-path pings when observed RTT samples stall - #7919
Merged
Merged
Conversation
CommaBot
force-pushed
the
feat/mesh-observe-ping
branch
from
November 21, 2026 06:46
8b444fc to
4773e81
Compare
…es stall Sub-second streams send or receive QUIC packets continuously. Those packets reset noq keepalive timers without eliciting ACKs, which freezes same_path_rtt_samples and blocks Gate upgrades to Direct. Update iroh to zzj3720/iroh@9d1903ef and point all four noq-proto patches to zzj3720/noq@4b0448dd. Request bounded single-path pings only when Gate or penalized Recovery stalls on an observed path: - Emit zero probes during cooldown, during direct_until holds, on stale paths, or when Gate capacity is full. - Wait until the final second of the Gate observation window before probing only the stalled side, and retry on the next tick if a reply drops. - Key probe state by connection and path across temporary RTT gaps and generation changes for 60 s. - Allow six probes before a 30 s backoff, issue at most one retry per 30 s backoff until independent ACK progress arrives, and preserve unanswered probe debt across late replies and same-generation RTT epoch resets. - Probe penalized Recovery after 3 minutes on Direct when RTT samples stall, and reset only after a new ACK. Changelog: 改进:持续收发数据流时也能及时切换到更快的直连路径 Changelog-parts: station web android desktop Co-authored-by: darksky <darksky@cue.surf>
CommaBot
force-pushed
the
feat/mesh-observe-ping
branch
from
November 21, 2026 07:02
4773e81 to
ff9c65c
Compare
CommaBot
added a commit
that referenced
this pull request
Nov 21, 2026
…clock now, index pace spend (#7952) - front.rs STREAMS 5 -> 6 (and mesh.mbt says 6): a front is kept across updates and only replaced when STREAMS rises, so one started before iroh.probeRelay (#7567), the shell's unix backlog/retry and conn.hand skip (#7568) and the noq path-idle/RTT-stall fixes (#7869/#7899/#7919) kept running the old binary after updating. - session_hub Hub::tw sets the threads store's now from the hub's clock before each write: insert_message stamps entries.at from the store's cached now, which nothing refreshed, so a person's message could carry an `at` hours off its ts. - accounts_pool pace_view finds a profile's (hour, scope) entry through a map instead of scanning the list for each spend row (quadratic on GET /profiles/pace); output is byte-identical (NaN hours stay separate, -0 and 0 merge). Tests: launcher test for a streams-5 front being replaced; harness op say.stampsNow with a node test (fails without the fix: at = the store's start time); a pace_view golden recorded from the old implementation. Co-authored-by: 3720 <zuozijian1994@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Sub-second streams (
< 1 sinterval) send or receive QUIC packets continuously. Those packets resetnoqpath keepalive timers without eliciting ACKs, which freezessame_path_rtt_samplesand stallsGateupgrades fromRelaytoDirect:Directfirst, the lagging endpoint sends pureMP_ACKpackets onDirectand freezesnext.sequence.PathKeepAliveonRelayand freezecurrent.sequenceeven while both endpoints remain onRelay.This pull request updates
irohtozzj3720/iroh@9d1903ef653a41444afee1dafd3e6cb2fb3a87d2(PathSelection::ping), updates all fournoq-protopatches tozzj3720/noq@4b0448dd90709d9ffc2db1dd2b5887435157477e, and adds bounded demand-driven single-path probing inlibs/mesh-transport/src/selection.rs:Gate.cooldown, duringdirect_untilholds, on stale paths (rx == 0whiletx >= 3for3 s), or whenGatetracking capacity is full.Gateobservation window (t >= 4 sfor5 sDirect upgrades,t >= 2 sfor3 sTransit switches) before probing only the side whosesample.sequencehas not advanced sincegate.compared, and retry on the next tick if a probe reply is lost.ProbeStateby(connection, path)with a60 sidle TTL across temporarysame_path_rttgaps and path generation changes, clearingin_flighton absence or generation bumps without refillingremainingor clearingbackoff_until.1in-flight probe (2 stimeout), a1 sminimum interval, and6probes before a30 sbackoff. After each30 sbackoff elapses without natural ACK progress, allow1single retry probe (<= 1 PING / 30 s) so pure unidirectional receivers never starve permanently after candidate churn.probe_seq_ceiling(+1per emitted probe), migrate unanswered probe debt (new_sequence + unanswered) across same-generation RTT epoch resets while resetting sequence tracking on true new path generations, and requiresample.sequence > probe_seq_ceilingto refillremaining = 6.DirecthasRecovery.failures > 0(Initialtier emits0probes) and stays selected for>= 3 min(STABLE_DIRECT_MS) with stalled RTT samples, share the same per-path budget and post-backoff single-retry token to confirm liveness, resettingfailuresonly aftersequenceadvances.Verification
cargo test --manifest-path libs/mesh-transport/Cargo.toml --lib --locked:126 / 126passed (17 / 17selection::probe_tests, including window-tail lost-probe retry, post-backoff starvation recovery forGateandRecovery, late probe reply rejection, same-generation RTT epoch-reset debt migration, temporary missing-RTT debt retention, generation churn burst bounding, and multi-peer isolation).cargo test --manifest-path libs/mesh-transport/Cargo.toml --lib --locked --no-default-features:113 / 113passed.client/core-ts/test/mesh.test.tsonmainafter#7927hot-set merge:120 / 120passed.Office-Host-2192.168.1.17<->tokyo-mac-studio-0192.168.1.124) & 5-minute steady-state measurements:200 msstream (550 ms/750 msstagger, initial Relay): switched toDirect(2.72-3.19 msRTT) in~5.0 safter dual-stack QNT candidate convergence (10.70-13.31 sfrom initial candidate appearance), emitting0-1SelectorPINGs (1onDirectwhennext.sequencestalled,0on Server) and0SelectorPINGs afterwards.200 msstream fromt = 0(initial Relay): switched toDirect(1.82 msRTT) in~5.0 safter dual-stack candidate convergence (10.94 stotal across two QNT candidate rounds), emitting2SelectorPINGs (1per candidate round onRelay,0on Server) and0SelectorPINGs afterwards.200 msstream with4 scandidate disqualification and recovery: switched toDirect(1.27-1.78 msRTT) in6.98-7.92 safter recovery, emitting1-2SelectorPINGs on Client (0on Server) and0SelectorPINGs afterwards.300 s) continuous200 mssteady state after switching toDirect:0SelectorPINGs on both endpoints (0totaltxPingsdelta on pure unidirectionalDirect).