Skip to content

bundle pull: a failed entry's retry waits for the whole pass to finish #2223

Closed

Description

@thiras

Summary

bundle pull retries a failed entry only after every other entry in the pass has finished. run_with_retries (crates/cli/src/commands/bundle_pull.rs:1738) drains the whole buffer_unordered stream and collects failures into next. It then sleeps entry_retry_backoff(round) (2 s, doubling, 30 s cap) and starts the next round. An entry that fails early therefore sits idle for the rest of the pass, even when --jobs has free slots and the link has headroom. Its partial is kept, so the retry resumes; only the wait is wasted.

Evidence (testnet, 2026-09-28, CLI aacaf469, mistral bundle 9194000d…)

The whole fleet restarted at 13:50:12–14 UTC (operator redeploy), so every provider dropped at once. Run 3 started at 13:43:31.

Time (UTC) Event
13:50:13 consolidated.safetensors (7cbb4846…) fails: all 2 candidate provider(s) failed … it goes into the next retry round. The other entries fail over in place and continue.
13:58:57 ad7f7e… done (4.23 GiB)
14:06:32 b32596… done (4.61 GiB). From here, only one entry is still running.
14:11:25 998030… done (4.66 GiB). 1 entr(ies) failed with a retryable error; retry round 1 of 2 starts in 2s.
14:11:27 7cbb48… resumes and runs its 2.42 GiB complement alone at ~8.6 MiB/s.

The failed entry sat idle for 21 min, including 5 min in which only one other entry was running. The same pattern cost ~19 min on 2026-09-28 11:16 → 11:35, after a single lon1 restart.

Proposed fix

Requeue a retryable failure into the same stream once its backoff elapses, instead of waiting for the round barrier. Keep the per-entry retry budget (retries) as a count per entry, not per pass. One way to do this is a FuturesUnordered fed from a queue: push sleep(backoff).then(run(item)) back onto it when settle returns true.

Acceptance

  • A unit test on run_with_retries: item A fails at t=0 while item B runs for 10 s. A's retry starts at t≈backoff, not at t≥10 s.
  • The retry budget per entry is unchanged: an entry that keeps failing stops after retries attempts.

Activity

  1. added
    kind:bug
    on Sep 28, 2026
  2. self-assigned this
    on Sep 28, 2026
  3. removed their assignment
    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

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