Skip to content

client: a streamed fetch with no size hint still drops the pull it opened for the size #2644

Closed

Description

@thiras

Follow-up to #2633.

Today. When a fetch has no size hint, LaneSources::first_claim opens the whole blob to read its signed size, then primes that pull on the lane (PrimedSource). A download's first leg is that same whole-blob range (BudgetPacer), so the drive adopts the pull and the holder writes the blob's wire bytes once. peer_store_probeless checks this.

A streamed fetch does not adopt it. That covers decdn get -o -, and the gateway's pull when its size lookup (#2616) finds no size, or when the lookup is skipped. stream_out drives with WindowPacer, which cuts the first leg to the read-ahead window and the deposit's room. That leg never equals align_range(0, 0, total), so the drive opens its own stream. The primed pull then closes when it goes stale (PRIMED_MAX_IDLE) or when the lane drops. The node has already written up to a credit window into it, and counts that in decdn_bytes_served_total.

Ask. Open the header pull at the range the streamed drive opens first, and prime that range. The node's multi-source pull leg already does this: PrimeLeg::predicted_leg and handshake_total_bytes in crates/node/src/node_origin/pull_leg.rs. The client needs the window pacer's first draw at an empty store, as a function that the streamer and first_claim share, so the two cannot drift. A range-past-end fault on the predicted leg falls back to a whole open, as the node's does.

Check. Add a served-bytes assertion for a streamed fast-path fetch: decdn get -o - in peer_store_probeless, or a gateway pull that has no size.

Activity

  1. added
    kind:bug
    area:client
    on Oct 27, 2026
  2. added this to the v0.3 milestone on Oct 28, 2026
  3. self-assigned this
    on Oct 28, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 28, 2026
  5. added a commit that references this issue on Oct 28, 2026
    e689dce
  6. moved this from In progress to Done in deCDNon Oct 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:clientkind:bug

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions