Handle loader publication rename races #1539
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1539
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1539"
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?
@Gauss999 on GitHub · 2026-11-28 21:23 UTC · original
Gauss999:patch-4→main· +80 −2 · 1 files · 3 commits · closed without mergingSummary
mainnow contains the cache-side race handling and its Windows regression test. That file was adopted unchanged, leaving this PR scoped tocrates/victory-loader/src/publish.rs.Tests
victory-loaderandvictory-pipelinewith and without all features, and the reported library test runs passed 49 + 9 tests.db24ab7. CI is awaiting maintainer approval.@babuakhil on GitHub · 2026-11-28 22:03 UTC · original
Built and tested this on Windows, since it hadn't been run yet: Windows 11, Rust 1.98.1 (pinned), applied on current
main(d4b5d51); both commits cherry-pick cleanly.cargo clippy -p victory-loader -p victory-pipeline --all-targets --locked -- -D warnings, with and without--all-features: passcargo test -p victory-loader -p victory-pipeline --lib --locked: 49 + 9 passed, 5 of 5 runsxtask policyfails only onlower.rs's size, which is already onmain(#1429)The race is real on Windows, and this fixes it. I stressed
Cache::get_or_convertfrom a throwaway integration test (not part of this PR): 300 rounds, each with 16 threads publishing the same new entry at once while 4 threads open the destination withshare_mode(FILE_SHARE_READ)(noFILE_SHARE_DELETE, as a scanner or a mapping reader would) and hold it for 200 µs. Each round also checks that no staging file is left and that the published bytes are right.main, run 1Access is denied. (os error 5)main, run 2With readers using
std::fs::read(which shares delete),mainhad no failures either (0 of 14,400), so the failure needs a reader that doesn't share delete. No staging files were left on either side, and the published bytes were right every round.The loader's
write_if_changedispub(crate), so I only covered it through this PR's unit tests, not the stress.One design note, not a blocker: the cache accepts any regular file at the destination after a failed rename, while the loader requires its exact bytes. That seems right given the key is a content hash; the PR says readers validate on decode, which I didn't check. Happy to share the stress test if it's useful.
Handle concurrent publication rename racesto Handle loader publication rename races@trustno1-coder on GitHub · 2026-11-29 08:28 UTC · original
Thank you! An earlier version of this pull request was merged into main with its original commits and is part of v2026.11.29.01, where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.
@Gauss999 on GitHub · 2026-11-29 18:34 UTC · original
Closing this after auditing the current heads: there is no residual behaviour left in this PR. The diff of crates/victory-loader/src/publish.rs against the current upstream/main is empty — the original commits are integrated upstream (
0c07d4ac, part of v2026.11.29.01, with authorship credit as noted above), and the branch only carries the merge commitdb24ab7eon top. Nothing further to review here; thanks for keeping the credit intact.Pull request closed