pingqiuandClaude Opus 5.5 566471971a storage: background hydrate walker (HydrateAll) for independent restore
HydrateAll makes every HEAD-named chunk local, lowest index first, through the
same shared fill flights as guest read misses (one fetch per chunk; queue bound
and read-miss timeout apply). It yields while any flight has guest waiters and
admits each fill through the host limiter (cfg.Budget) with the caller's ctx, so
the restore driver sets hostlimit.BackgroundFill on it. A refused admission or a
pending fill backs off and retries; ctx cancel returns the remaining count.
ChunkLayerStats.AbsentChunks reports what is still to fetch (0 = fully local).

Tests: every chunk fetched exactly once and the HEAD image reads back, a second
walk does nothing; local writes (full and partial chunk) are never overwritten;
the walker issues no fetch while a guest waits and never fetches twice; each fill
is admitted once and released, refusals are deferred, the caller's class reaches
Admit; cancel reports the remaining count; AbsentChunks before/after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 19:52:47 -08:00
Languages
Go 84.7%
Rust 7.7%
Shell 2.7%
templ 1.5%
Java 1%
Other 2.1%