XGameSave: defer container deletion until work dispatch #108
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!108
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/108/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?
@certified-retart on GitHub · 2026-11-23 11:17 UTC · original
certified-retart:fix/gamesave-defer-delete→main· +172 −8 · 1 files · 1 commits · merged 2026-11-23 11:32 UTCA title using a manual work port could submit a container delete, see the operation still pending, and find its save already gone. A terminated queue could report E_ABORT after the same deletion.
Resolve the container path while the caller's inputs are valid, and delete it in the queued work callback. Serialize deletion with blob updates and report the status through XGameSaveDeleteContainerResult. Both delete entry points now apply the same name length checks as container creation.
Three synthetic tests cover manual dispatch with released inputs, queue termination before work runs or before submission, and invalid arguments preserving existing saves. On Windows, 432 library tests and 2 launcher integration tests passed with a single test thread. The library suite reported 16 ignored.
github-bot referenced this pull request2026-11-26 05:05:54 +00:00
@raylitebull on GitHub · 2026-11-23 11:22 UTC · original
Nice fix — deferring async container deletion until work dispatch and serializing it with
apply()is much cleaner and strictly supersedes #95 (which only added the empty/overlong name guard). I've closed #95 in favor of this PR.Note: #97 touches the complementary parts of
gamesave.rs(atomic~xcltmp+MoveFileExWwrites insideapply(), NTFS case-insensitive lookups, and nulloutvalidation inXGameSaveInitializeProviderResult) — happy to rebase #97 cleanly on top once this lands.@certified-retart on GitHub · 2026-11-23 11:24 UTC · original
Thanks for the name-validation fix in #95 and for coordinating the overlap. I checked the current heads locally: #97 at
2d94699and #108 atb3dd82dmerge cleanly with git merge-tree. The mutation lock in #108 covers apply(), including the atomic write path proposed in #97.@ivall on GitHub · 2026-11-23 11:32 UTC · original
Merged. It conflicted with #95's identical name check, which had landed on
mainwith #96–#102 before #95 was closed; resolved in favour of your deferred form (delete_path+delete_containerunderSAVE_MUTATION). Checked on Windows 11 with an RX 9070:cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), lib tests also withXCL_SPLIT_WAVE64=1; Unicorn Overlord runs with #107–#109 merged. Thanks!