Skip to content

node: most cache-miss refusals log nothing at info, so an operator cannot see why a node answered NotFound #2282

Closed

Description

@yigitdot

Summary

A node refuses a paid request with NotFound through several miss paths. Only one of them, the coverage gate, logs the refusal at info. The other paths only increment decdn_serve_stream_rejected_cache_miss_total, so Loki cannot show which request was refused, for which hash and range, or why.

Evidence (testnet, 2026-10-01, 21:25–22:15 UTC)

Bundle pulls of Whisper large-v3 and SDXL base 1.0 from one client:

  • The client logged 18 delivery refused: NotFound lane faults from hel1 (0xEE08…8B6d), for example:
    21:27:35.510 provider=0xEE08… hash=c5f9fd37… offset=16384 len=16384 landed=0 uncovered=false fault=Source error=delivery refused: NotFound
    21:39:55.586 provider=0xEE08… hash=64a704d7… offset=442368 len=82251 landed=0 uncovered=false …
    21:49:16     provider=0xEE08… hash=5aee6bda… offset=489865216 len=20283392 …
    
  • hel1 decdn_serve_stream_rejected_cache_miss_total: +34 in the window.
  • hel1 Loki over the same window (|~ "c5f9fd37|64a704d7|5aee6bda|7b910d7a|89bdeffb|serve-miss|refus"): one line. It is the coverage gate message for an unrelated hash and peer (22:10:08, 5a7fddce…). None of the client's 18 refusals appear.
  • lon1, by contrast, logged its refusals: they took the coverage gate path (serve-miss: no candidate covers part of the missing range; refusing before commit).

Why (code)

The refusal reasons come from FillOutcome::miss_reason. Its callers log differently:

path site log
coverage gate window.rs pull_range_uncovered info, with hash, offset, len, candidates
pull leg open returns a miss window.rs open_pull_leg_bounded, Ok(Err(miss)) none
pull leg open times out window.rs open_pull_leg_bounded, Err(_elapsed) metric only (node_pull_through_timeout)
buffered pull-through clean miss dispatch.rs ~L1145 via fill.rs node_pull_through debug (node-to-node pull-through found no source)
no pull-through configured or not authorized dispatch.rs ~L1141 none

Proposed

  • Log every CacheMiss and InternalError refusal once at info at the point where respond_error sends it, with hash, byte_offset, byte_len, the reason, and which path refused (coverage_gate, pull_leg_miss, pull_leg_timeout, buffered_miss, no_pull_through).
  • Or add the path as a label on the reject counter, so a dashboard can split cache misses by cause.
  • Keep the wire answer unchanged (NotFound), so no channel or load state leaks to the client.

Related

#2281 (the client asks a partial holder again after it refuses inside its coverage).

🤖 Generated with Claude Code

Activity

  1. added
    kind:feature
    rust
    prio:low
    area:node
    on Oct 1, 2026
  2. self-assigned this
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodekind:featureprio:lowrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions