mirror of
https://github.com/vhaudiquet/ecrou.git
synced 2026-11-12 22:22:44 +00:00
Two concurrent cold runs of the same image both downloaded it; the atomic rename made it safe, not cheap. prepare now takes an exclusive flock on a <entry>.lock sidecar before downloading, so a second run waits and reuses the winner's entry - re-deriving the freshness answer under the lock, since the digest it saw may be its own download. no_cache callers skip the lock: an explicit fresh download never waits. Locks release on process death, so a crashed run cannot wedge the cache.