Skip to content

fetch: stall floor is per-stream only, so a per-entry crawl never triggers failover or a second source #2120

Closed

Description

@thiras

Symptom

During a testnet gpt-oss bundle pull, the transfer dropped from about 10 MB/s to well under 1 MB/s of useful payload, from one provider, for more than 20 minutes. Two other bonded providers sat idle. No stall, failover or WARN fired.

Root cause

  • The floor only catches near-dead streams. It is --min-throughput-bps 4096 over the trailing --stall-timeout-ms 30000 window of one stream, 120 KiB per 30 s (crates/client-pull/src/lib.rs:1099-1104, :2401). It exists to catch dead or drip-feeding streams, and it does not score the peer.
  • Per-stream checks miss per-leg crawls. In the range-dedup path each 16 KiB leg is a separate, briefly healthy stream, and the gaps between legs belong to no stream. So a per-entry crawl can never trip the floor (bundle pull: range-dedup complement pays ~1,300 16 KiB boundary ranges serially, one QUIC connection each #2119).
  • Nothing re-ranks a slow source. No mechanism compares an entry's effective throughput against other candidates or adds a second source mid-entry. The 10 s --unit-deadline-ms exists only inside the multi-source scheduler, and the dedup path never uses that scheduler.

Candidate fixes

  • A. Track progress per entry (bytes landed per wall-clock, across legs). When it stays below a floor relative to the entry's remaining size, try the next candidate or fan out.
  • B. Surface the entry's effective rate and ETA in -v output so a crawl is visible.

🤖 Generated with Claude Code

Activity

  1. added
    kind:feature
    area:cli
    on Sep 22, 2026
  2. self-assigned this
    on Sep 22, 2026
  3. moved this from Backlog to In progress in deCDNon Sep 22, 2026
  4. moved this from In progress to Done in deCDNon Sep 22, 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:feature

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions