You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CacheEngine::rescan_origins rebuilds the origin-held index wholesale and swaps it atomically. A candidate whose size probe fails is dropped on the same branch as one the origin genuinely does not hold — crates/cache/src/engine.rs:
Err(..) and Ok(None) collapse into "origin doesn't have it → skip", with no log and no counter. The only surviving signal is the per-origin enumerate warn a few lines above, which covers a different failure.
Why it matters
For an S3/R2/HTTP origin, origin_size is a live HeadObject/HEAD. A transient 5xx or a throttle window during a rescan silently evicts those hashes from the announce set until the next successful rescan.
Everything downstream then reports success. origin_held_hashes() returns the truncated set; dht::publish::holder_snapshot folds it in with store_error: None, i.e. a fully healthy snapshot. On the boot path that shrunken set becomes the cold-start seed and cold_start_count reads plausibly low; on the sweep path reseeded under-reports and decdn_dht_republish_seed_store_walk_failures_total stays at zero.
Net effect: an origin-only node that hits a throttled HeadObject window during its boot rescan advertises a fraction of its content for a full rescan interval, with every signal green.
Suggested fix
Distinguish Err from Ok(None):
Ok(None) — the origin genuinely does not hold it. Skip, as today.
Err(..) — a probe fault. Count it (decdn_cache_origin_probe_failures_total or similar), and consider carrying the previous index entry forward rather than dropping it, so a transient fault does not shrink the announce set.
Exposing the drop count would also let HolderSnapshot carry it alongside store_error, which is what would actually deliver the "both seed paths cannot drift apart" property #1806 aims for.
Activity