Skip to content

bundle pull: one SELECT_K sample for the whole run hides holders from every entry #2204

Closed

Description

@thiras

Summary

decdn bundle pull samples its probe candidates once per run. Every entry then reuses that one sample. With 7 registered nodes and SELECT_K = 5, two nodes are invisible for the whole pull. The skipped nodes can be the only nearby holders of an entry. Meanwhile, nodes that hold no entry take probe slots on every entry.

Evidence (testnet, 2026-09-28, CLI and fleet on 2153388b)

decdn bundle pull --hash 9194000d… --namespace 1 (mistral-7b), started 05:57:58 UTC:

  • decdn_probe_requests_total over the first 15 min: bcl 27, fra1 14, lon1 14, hel1 14, hil1 14, nbg1 2, ash1 1. The 14 is one probe per manifest entry. The run's sample was bcl, fra1, lon1, hel1, hil1.

  • Direct decdn probe of all 7 nodes at 06:03 UTC:

    Entry Holders
    998030d5… (4.66 GiB shard) fra1, lon1, nbg1, ash1, bcl
    b3259696… (4.61 GiB shard) fra1, lon1, hel1, ash1, bcl
    ad7f7e2b… (4.23 GiB shard) lon1, ash1, bcl
    7cbb4846… (consolidated, range-deduped) bcl
  • nbg1 and ash1 hold two or three of the shards and served ~0 bytes for the run (decdn_bytes_served_total: nbg1 0.15 MB, ash1 0). hil1 holds none of them and took a probe slot on every entry.

Cause

discover_candidates (crates/cli/src/commands/bundle_pull.rs:1166-1192) reads the registry and calls discovery::select_candidates(all, region, SELECT_K) once. resolve_selection stores the result, and every entry probes that list (pick_excluding). Its doc comment says "keep the region-nearest candidates, which every entry in the manifest then reuses". With no client region the sample is a uniform random 5 of 7, fixed for the run.

decdn fetch draws a new sample for each fetch, so one unlucky draw costs one blob. A bundle pull makes one draw for all of its entries.

Fix shape

Keep the one registry read, but call select_candidates for each entry (or each hash group). Each entry already probes its candidates, so a fresh sample for each entry costs no extra probes. The multi-source admission and proxy-warming order then see the holders of each entry.

Tests

Nothing asserts that two entries of one bundle can probe different candidate sets.

Activity

  1. added
    kind:bug
    area:cli
    on Sep 28, 2026
  2. self-assigned this
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:bug

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions