startup: list save containers and blobs under the shared publication lock #1754
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1761"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T18:11:44Z.
Part of the split of #1334 (enumeration, store only). No slot wiring:
runtime_proxy.cpp,save_read.inland the docs are untouched, so this does not overlap #1429 or the #1334 draft's slot code. The slot wiring (13, 14, 18, 20) is the next slice, after this one.Change
Storeinsrc/startup_stubs/save_store.hgets two read-only methods and two entry types:list_containers(std::vector<ContainerEntry>&): directories directly below the root, by name (byte order). Links and junctions, plain files, and namesvalid_namerefuses (lock, staging and old suffixes in any case) are not listed. A root that does not exist yet lists as empty.list_blobs(container, std::vector<BlobEntry>&): name and size of the regular files of one container, by name. It is taken under the sharedlock_container, the publication pointread_blobsuses, so a commit from another process is listed whole or not at all. After acquiring the shared lock,list_blobsre-checks the container directory status so a concurrentdelete_containeror redirect swap while waiting for the lock reportsnot_foundorbad_namerather thanio_error.not_foundfor a missing container,bad_namefor an invalid or redirected one,busywhen the lock stays held for the whole timeout,too_largefor a blob overmax_blob_bytes.outis replaced only onok; on every other status it is left as the caller had it. No partial output.Test
tests/startup_gamesave_enumerate.cpp(plain C++17, synthetic data, registered next tostartup_gamesave_persist). It covers:.x2w-part,.x2w-old,.x2w-lock(also.X2W-PART), a name with.., a subdirectory, a plain file or lock directory in the root, a linked blob and a linked container (the link controls are skipped with a printed note where the platform refuses to create one);not_found,bad_name,io_error(regular-file container / regular-file root), redirected root, empty root and empty container,too_largeover the limit and the exact limit listed, all verifyingoutis untouched on non-okstatus;list_blobsreturnsbusyafter the timeout with the output untouched and another container still lists; after release the call succeeds;list_blobsreturnsnot_found(notio_error) with the output untouched;commitwhile this process lists in a loop: every listing has both blobs at one size, none fails, and it saw more than one generation.Results
Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at
ccba9fcf9b0f858b9afc39130fa92d97024885d0--preset dev):cmake --build --preset dev --target d3d12_xs_shim startup_gameinput_history startup_gameinput_keys startup_gamesave_enumerate startup_gamesave_persist startup_gamesave_publish_locked startup_gamesave_publish_unlocked startup_stream_consumer startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xmem_shim -- -j 8):6.18s(configure1.71s)ctest --preset dev -R '^(startup_gameinput_history|startup_gameinput_keys|startup_gamesave_enumerate|startup_gamesave_persist|startup_gamesave_publish_locked|startup_gamesave_publish_unlocked|startup_storage_directory_batch|startup_stubs)$' --parallel 6 --no-tests=error --output-on-failure): 8/8 passed (2.33s:startup_gamesave_enumerate1.70s,startup_gamesave_persist0.79s,startup_gamesave_publish_locked2.19s,startup_gamesave_publish_unlocked1.02s,startup_stubs0.70s,startup_storage_directory_batch0.20s,startup_gameinput_history0.05s,startup_gameinput_keys0.03s)/O2(--preset release):8.66s(configure1.71s)2.26s:startup_gamesave_enumerate1.27s,startup_gamesave_persist0.65s,startup_gamesave_publish_locked2.13s,startup_gamesave_publish_unlocked0.99s,startup_stubs0.53s,startup_storage_directory_batch0.21s,startup_gameinput_history0.05s,startup_gameinput_keys0.03s)startup_gamesave_enumerate, Debug):list_blobs: FAIL (5 checks failed:busy,busyoutput untouched,busytimeout, concurrent deletenot_found, and torn-generation check)list_blobs: FAIL (1 check failed: concurrent container delete while waiting for lock)Linux (local)
g++ -std=c++17 -O2 -Wall -Wextra -fsanitize=address,undefined -fno-sanitize-recover=undefined -pthread, no warnings.startup_gamesave_enumerateandstartup_gamesave_persistpass under ASan and UBSan.Additional Linux mutations of
save_store.h, each rebuilt and restored:list_blobsbusytoo_largetests/docs_links_check.pyandtests/bidi_controls_check.pypass,git diff --check origin/main...HEADis clean.git merge-treeof this branch against currentorigin/mainhas no conflicts.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T18:55:42Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
ccba9fcℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.