pipeline(cache): accept shader cache entries published concurrently while open #83
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!83
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/83/head"
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?
@Androtim on GitHub · 2026-11-29 05:42 UTC · original
Androtim:feat/iter84-cache-concurrent-publish→main· +65 −3 · 1 files · 1 commits · merged 2026-11-29 06:05 UTCSummary
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 warnings@Androtim on GitHub · 2026-11-29 06:04 UTC · original
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).