Repository navigation
perf(cli): start a cold fetch 250 ms after the first answer - #2300
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]>
…starts Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…st as they answer The first probe round of a fetch, and of each bundle-pull entry, returns at the first verified holder with any answers already in, and keeps its pending probes as a tail. CliSources pushes each late holder through SourceProvider::arrivals, and each late non-holder the proxy-warming rule picks against the best holder known so far. Rediscovery keeps the 250 ms cutoff and drops its tail. A round with no holder still waits for every probe. fetch timings reports holders_start and holders_joined. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ode per operator A task drives a streamed round's pending probes from the end of the round, so a slow signer unlock or pool open between the round and the fetch neither times them out nor inflates their RTT. Their answers wait in a channel, and the task stops when the tail is dropped. A late node of an operator the set already has never replaces the node the set already has. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A streamed probe round with no holder in hand ends 250 ms after its first verified answer and starts on the non-holders it has as pull-through targets (#1911). A holder that answers inside the window ends the round at once, and one that answers later joins the running fetch through its arrivals. A rediscovery still waits for every probe when no holder answers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…utoff # Conflicts: # crates/cli/src/commands/fetch.rs
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.
Stacked on #2298 (itself on #2297); merge the three together.
Summary
A probe round with no holder waited for every probe, so one slow connect held a cold fetch for up to the 5 s probe timeout. A cold fetch is the normal state for a blob's first fetch. Now a streamed round with no holder in hand ends
PROBE_SETTLE_AFTER_HOLDER(250 ms) after its first verified answer, and starts on the non-holders it has as pull-through targets (#1911).SourceProvider::arrivals(feat(client,cli): start a fetch on its first holder and join late holders as they answer #2298).ProbeRound::Settle) is unchanged. It still waits for every probe when no holder answers.Measurement
--rediscoverfetches of the empty blob, which no node reports holding, on the testnet.Test plan
settle_probes):cargo clippy --workspace --all-targets --all-featurescargo nextest run -p decdn-cli(891 tests)RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items--rediscoverfetches against the testnet🤖 Generated with Claude Code