Repository navigation
perf(cli): settle the probe round 250 ms after the first verified holder - #2297
Merged
Merged
Conversation
probe_and_order waited for every probe with join_all, so one slow connect held the fetch for up to the 5 s probe timeout. On the testnet one node's first connect takes about 1.7 s while two holders answer within 170 ms. Each probe now verifies and classifies its own answer, and the round ends 250 ms after the first verified holder answers, or when every probe has answered. A round with no holder still waits for every probe, so a cold blob sees every reachable pull-through target. A dropped holder stays reachable through the fetch's later discovery. Each probe's outcome and elapsed time log at debug. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit b17f0e5 in the Show a line coverage summary of the most impacted files.
|
This was referenced Oct 2, 2026
Merged
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
probe_and_orderwaited for every probe (join_all), so one slow connect held the fetch for up to the 5 s probe timeout. On the testnet, one node's first connect takes about 1.7 s, while two holders answer within 170 ms.PROBE_SETTLE_AFTER_HOLDER(250 ms) after the first verified holder answers, or when every probe has answered. A holder that answers later is either about 125 ms farther away or still connecting, so it would not lead the order.classify_probe→ProbeOutcome), so a fast answer with a bad signature cannot cut the round short.debug, plus a line for how many probes the cutoff dropped.ProbeTally, which drops thecognitive_complexity/too_many_linesexpectation onprobe_and_order.probe_and_order, so they get the cutoff too.Measurement
decdn fetch --rediscoverof a 543 KiB blob on the testnet. Probe round =resolved_ms − probe_start_msfrom thefetch timingsevent.Test plan
settle_probesunit tests on a paused clock: keeps answers inside the grace; drops a straggler and returns at first holder + 250 ms; waits for every probe without a holdercargo clippy --workspace --all-targets --all-featurescargo nextest run -p decdn-cliRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-itemscargo test --no-run -p decdn-e2e --features anvil-e2e--rediscoverfetches against the testnet🤖 Generated with Claude Code