Skip to content

client: the peer-store fast path still takes its first size claim from a stream it drops unread #2633

Closed

Description

@thiras

Follow-up to #2619.

Today. The peer-store fast path (store_fast_path in crates/client/src/targets.rs) builds a fetch's candidates from fresh peer-store records with no network probe. It sets no size hint. A blob fetch on that path with no known size therefore takes its first size claim from LaneSources::open_for_header (crates/client/src/lane_sources.rs): a whole-blob paid open that it drops once it has read the header. The node writes up to a credit window into that stream first (about 1 to 2 MiB, more with banked lane credit) and counts it in decdn_bytes_served_total.

Why #2619 left it. #2619 made a pinned --node-id fetch probe its node for the size. The fast path is built to send no probe, and its candidates are not known to hold the blob, so probing its first candidate would add a round trip and often return no size.

Ask. Remove the throwaway stream on this path without giving up the probe-free start. Options to weigh:

Add a served-bytes assertion like the one #2619 added to crates/e2e/tests/gateway_public.rs, on a fetch that takes the fast path.

🤖 Generated with Claude Code

Activity

  1. added
    kind:bug
    area:client
    on Oct 26, 2026
  2. self-assigned this
    on Oct 26, 2026
  3. assigned and unassigned on Oct 26, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 27, 2026
  5. moved this from In progress to Done in deCDNon Oct 27, 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

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions