Skip to content

client: multi-source leaves blocks no lane covers until the end, then reports a bare 'all sources failed' #2225

Closed

Description

@thiras

Summary

When no multi-source lane covers some discovery blocks, those blocks are never queued. spread_segments returns them as _uncovered (crates/client/src/scheduler.rs:1283). They stay missing until every worker finishes, and then the fetch fails with a bare all sources failed; N bytes unfetched (scheduler.rs:1502). The CLI then falls back to single-source failover, which fetches the uncovered bytes serially at the tail.

Two problems:

  1. Misleading error. No source failed; the detail list is empty. The bundle log reads like an outage (multi-source fetch of an entry failed (all sources failed; …)). The residual here is "not covered by the chosen lanes", and the message should say so.
  2. Tail latency. The uncovered blocks start only after the covered work ends, and then go one leg at a time. A partial-holder lane can still serve a range it does not hold, through node pull-through, so the blocks could be queued to a lane from the start, or at least run in parallel with the covered work.

Evidence (testnet, 2026-09-28, CLI aacaf469, mistral bundle 9194000d…, run started 14:16:57 UTC)

Entry b32596… (4.61 GiB shard). The multi-source lanes were fra1 (07a53e…) and nbg1 (c77ba1…), both partial holders.

  • From 14:38:06 to 14:39:13 the client opens legs for this entry only near the end of the blob (offsets 4.63–4.95 GB).
  • 14:39:16: WARN bundle pull: multi-source fetch of an entry failed (all sources failed; 805306368 bytes unfetched); falling back to single-source failover over the same candidates. That is 768 MiB, exactly 12 × 64 MiB units, starting at offset 1677721600. No provider fault is listed.
  • 14:39:17: single-source opens byte_offset=1677721600 byte_len=67108864 on fra1. The client reports 0.7–1.8 MiB/s for this tail.
  • 14:43:37: the entry is done after 1595.6 s. In runs with a full holder among the lanes it took 1343 s (13:17 run) and 1376 s (13:43 run). The tail cost ~4 min.
  • The same bare message, with no detail, appeared at 12:52:56 for the same entry (2734861280 bytes unfetched).

Proposed fix

  • Report the uncovered residual separately: N bytes not covered by any chosen lane. Keep "all sources failed" for real lane faults.
  • Queue uncovered blocks up front, onto the lane with the best rank (served via its pull-through), instead of deferring them to the post-fan-out fallback.

Acceptance

  • A unit test: lanes whose coverage leaves a gap produce no "all sources failed" error when the gap is fetched through a non-holder lane.
  • The fallback WARN is not emitted when no lane faulted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind: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