XGameSave: stage all blob writes before renaming (#324) #491
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!491
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/491/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?
@Grimkaaah on GitHub · 2026-11-24 01:00 UTC · original
Grimkaaah:fix/324-gamesave-atomic-submit→main· +113 −17 · 1 files · 1 commits · closed without mergingSummary
XGameSaveSubmitUpdate/applynow stages every write (display + blobs) to sibling temp files, and only renames them into place after all stages succeed.E_FAILwithout changing the container (GDK all-or-nothing).Oldand bloba = old, with no blobb.Fixes #324
Test plan
cargo test -p xcl --lib hle::xgameruntime::gamesave::(11 passed)@futurepro62 on GitHub · 2026-11-24 03:04 UTC · original
Tested exact head
60930bb(on its base2997c9a).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 677 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Not tested
scripts/smoke.ps1(no title on this machine), AMD, wave64 hardware, a release build.AI use
@H0UNDZER0 on GitHub · 2026-11-24 03:05 UTC · original
Tested on an RTX 5080, release build: pass, 677 passed, 0 failed.
60930bb057093bd7b2d89f1a95ee4d38aacb6aa3, this PR's head as is (on its base2997c9a), release build.XCL_*variables set.cargo build --release --workspace --locked: OK, with 2 warnings more thanmain's one: unused importAtomicUsize(gamesave.rs:7, used only undercfg(test)), andwrite_atomicis never used (gamesave.rs:190).cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with--show-output): 677 passed, 0 failed, 41 ignored both times.main2997c9agives 676 / 0 / 41 on this PC: the difference is the newfailed_submit_leaves_container_untouched, which passes.SKIPPED: the usual 2,gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64).e2e), its save-storage check included, ends withfailures: 0.Not tested
main. When this was written that wasdd2ae9a;git merge-treeshowed no conflict.scripts/smoke.ps1.AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)
@MesshM on GitHub · 2026-11-24 05:24 UTC · original
Test run of
60930bb057093bd7b2d89f1a95ee4d38aacb6aa3on AMD RDNA4. I merged it onto currentmaind208e14locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 705 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 664 passed, 0 failed, 21 ignoredSKIPPED; thegamesavetests pass,atomic_writes_preserve_xcltmp_blobs_and_skip_leftover_tempsincluded.Review: Staging every write to a sibling temp and renaming only after all stages succeed makes a failed update leave the container as it was, which is what #324 asks for (the GDK's all-or-nothing). The renames themselves are still separate, so a failure between two renames can leave a partial update; that window is much smaller than before but not zero.
Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@raylitebull on GitHub · 2026-11-24 10:44 UTC · original
Closing as a duplicate of #543 for #324, which passes the
PR descriptioncheck (whereas this PR failsPR description).Pull request closed