pipeline(cache): accept shader cache entries published concurrently while open #83
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/83"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T05:42:06Z.
Summary
Adapted from upstream
Marvisak/VIctory#1324/VIctory-NVIDIA#664(701dcbc, GPL-3.0), extracted cleanly offorigin/main(8d89ba6) with zero overlap against open PRs:crates/victory-pipeline/src/cache.rs): Whenget_or_convertraces with another thread/process that publishes and opens the same content-addressed shader cache entry beforepersist/rename completes (producing Windows access denied / sharing violation), remove our temporary staging file and open the published entry instead of treating the race as an untranslatable shader error and dropping its draws.accepts_entry_published_concurrently_while_open(which reproduces the share-mode-read Windows lock contention).Verification
cargo xtask policy:asset policy: 303 files okcargo test -p victory-pipeline --locked: 8 passed; 0 failed (includingaccepts_entry_published_concurrently_while_open)cargo clippy --workspace --all-targets --locked -- -D warnings: 0 warningscargo clippy --workspace --all-targets --features diagnostics --locked -- -D warnings: 0 warningsImported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T06:04:03Z.
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):passingReview Summary
crates/victory-pipeline/src/cache.rs):Cache::get_or_convertseparatesfile.write_all(&output)fromstd::fs::rename(&tmp, &path)so write failures still fail immediately after cleaning up the staging file, while a failedrenameremoves the staging file and acceptspathifpath.is_file()is true. BecauseCacheKeyis content-addressed and entries are only published atomically via temp-file rename, an existing regular file atpathis a valid concurrent publication. Non-file collisions (such as a directory atpath, covered byfailed_publication_removes_the_staging_file) continue to return an error.accepts_entry_published_concurrently_while_openholdspathopen withFILE_SHARE_READ(share_mode(1)), asserts that replacingpathviastd::fs::renamefails under contention, verifiesget_or_convertsucceeds with the expected bytes, confirms no staging files remain in the bucket directory, and dropsconvbeforeTempDirso cleanup succeeds on Windows.Automated technical triage only — not formal maintainer approval.
Generated with Antigravity CLI (
agy).