upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
authorSnooozs <0randale196@gmail.com>2026-11-24 17:31:17 +0100
committerSnooozs <0randale196@gmail.com>2026-11-24 17:33:10 +0100
commit34e6b29682216bd878b4d5571a56b2cd19a82607 (patch)
tree02e2a11e982f8605c3d18a60082ba946a58386b3 /runtime/src/main.cpp
parent3ed8e50b754eb9dcf9e3819eddbbbccd52fc1177 (diff)
xgameruntime_gamesave: undo a partly applied update instead of leaving it (RT-GAMESAVE-COMMIT-ROLLBACK)
commit() replaced blobs one rename at a time. When a later rename failed (the blob held open by another process without FILE_SHARE_DELETE), the earlier renames stayed, the update returned E_GS_OUT_OF_LOCAL_STORAGE and the container was left half new, with "<blob>~" temporaries behind. Each op now copies its blob to "<blob>~b~" before it changes the blob. A failed op undoes the applied ones, newest first. Deletes are applied in the same ordered pass, so a failed write also undoes a delete. The scratch names end in '~', which encode_name never produces and decode_name rejects, so enumeration and the quota never see them. A backup whose restore failed is kept, and later commits only remove backups they wrote themselves. A commit drops the temporaries of one that died midway. A blob never leaves its name, so a process that dies midway leaves each blob old or new, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions