mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 18:47:20 +01:00
566471971ad12f23b1170eebf34406dfb7c6db41
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>
Languages
Go
84.7%
Rust
7.7%
Shell
2.7%
templ
1.5%
Java
1%
Other
2.1%