You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bundle pull: prefer the manifest's node for chunk fetches, fall back to discovery #1294
area:clidecdn binary: get, gateway, pool, publish, origin, setupkind:featureNew capability or a change to current behaviorprio:mediumScheduledrustDependabot: a Cargo update; use area: labels for Rust code otherwise
PullCtx::reconstruct_entry fetches each chunk of a DECDNMAN file manifest through PullCtx::fetch, which calls pick. With auto-discovery active (no --node-id), that runs a full probe_and_rank round across all candidates per chunk. A 10 GiB file is 40 chunks, so a bundle entry that expands into a manifest costs 40 probe fan-outs before any bytes move.
The obvious fix — pin the manifest blob's (node_id, provider) for all chunks — is not safe on its own: probe_and_rank filters candidates on resp.body.has_blob for the hash being fetched (crates/cli/src/commands/fetch.rs:290), so the per-chunk pick is what guarantees the chosen node actually holds that chunk. Nodes hold blob subsets and evict independently; pinning turns a per-chunk availability check into an assumption, and a manifest whose tail was evicted from the serving node fails mid-reconstruction instead of finding another holder.
Proposed shape:
split a fetch_from(hash, node_id, provider) out of PullCtx::fetch, bypassing pick
reconstruct_entry tries the manifest's node first for each chunk
on a not-found/refusal from that node, fall back to pick(chunk_hash) for that chunk (and carry the newly discovered node forward as the new preferred target)
That removes the probe from the common path — one fan-out instead of N — while keeping the availability guarantee. Worth checking whether the same preferred-node-with-fallback policy should also apply to sibling entries within one bundle, which today re-probe per entry by design (#936).
area:clidecdn binary: get, gateway, pool, publish, origin, setupkind:featureNew capability or a change to current behaviorprio:mediumScheduledrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Activity