Repository navigation
Conversation
XGameSaveSubmitUpdate wrote each blob with its own temp-and-rename, so a write that failed halfway left the container with some of the update applied. Stage every blob of the update under a ~xcltmp. name first, then rename the staged files into place in order; if a step fails, the steps already applied are rolled back. The write_atomic helper had no other caller and is removed. Fixes xcl-dev#324
milas6669
force-pushed
the
xgameruntime-atomic-save-update
branch
from
November 24, 2026 02:46
8ca965c to
1fa5167
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
XGameSaveSubmitUpdate wrote each blob with its own temp-and-rename, so a write that failed halfway left the container with part of the update applied. Every blob is now staged under a
~xcltmp.name first and then renamed in order; if a step fails, the steps already applied are rolled back.write_atomichad no other caller and is removed.Fixes #324
What is in it
gamesave.rs:stage_file,Step, the staged/rollbackapply(); one existing test adapteda_failing_write_leaves_the_whole_update_undone(fails without the fix) andan_update_applies_its_steps_in_orderTested
cargo test --workspace -- --test-threads=4: 647 passed, 0 failed, 21 ignoredgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Regression run
scripts/smoke.ps1againstNot tested
scripts/smoke.ps1main vs PR headAI use