Repository navigation
GPU: a save that fails gives its changes back for the next one - #2327
denkencar-sketch wants to merge 1 commit into
Conversation
|
I tested both list writes through
The test-only commit |
catminou4
left a comment
There was a problem hiding this comment.
A save that fails gives its changes back for the next one (Dirty::take reset on error). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Same cluster; atomic-ish retry semantics look right.
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090:
- Restoring dirty flags when a pipeline library save fails ensures pending changes are not lost for the next save.
cargo test -p victory-gpu pipeline::library::tests: 9/9 passed (includinga_failed_save_leaves_its_changes_to_the_next).cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
|
Automated triage for the maintainers. Verdict: merge candidate. Rebased at For the maintainer: #2232 has since been closed, and #2328 (one save at a time) also touches CI: passing ( Generated by Claude Code |
|
I ported your change across the current On app-local WARP, the same fixture left both cache list files missing after the second save on You can cherry-pick the two commits in that order. Please retain the Git authors. If you fold the fixture into the fix, please include |
The marks were cleared before the library was serialised and written, so a failure at shutdown left nothing to save.
2ba6697 to
e4edac7
Compare
|
For triage: on AI-assisted (Claude Code). |
|
@denkencar-sketch I moved the end-to-end retry probe to your current The fixture blocks each list file in a fresh process, calls production App-local WARP passed all 13 library tests on your head with the probe. Strict all-feature GPU Clippy passed. If you take the test, please retain its Git author, or add |
fuzeofficlal
left a comment
There was a problem hiding this comment.
Dirty::take and Dirty::restore (crates/victory-gpu/src/pipeline/library.rs:317-405) preserve concurrent increments accurately across OOM (try_reserve_exact), D3D12 Serialize, and filesystem error paths without losing newer USED_CHANGED, added, or prebuilt_changed updates.
Non-blocking follow-up / coordination notes:
- As on
main,LAST(L306-316) only guards the throttle timestamp rather than serializing the full save through file publication, and anEARLY_FILEerror skipsPREBUILT_FILEvia.and_then;#2803addresses full-save serialization and independentEARLY_FILEhandling, so keeping both semantics together when reconciling#2327/#2803/#2129will cover all save paths cleanly. - Minor formatting nit:
rustfmt --checkflags the new lines atlibrary.rs:386andlibrary.rs:579(>100 columns).
Local verification at e4edac7d (and cleanly merged onto origin/main at a610d5f5): xtask policy (191 files ok), cargo clippy -p victory-gpu --all-targets (default and --all-features, 0 warnings), and pipeline::library under VICTORY_D3D12_DEBUG=1 passed on both RTX 5090 (12/12) and WARP (12/12). Approving.
…nges back for the next one
Summary
save()cleared the dirty marks before the library was serialised and written, so a save that failed at shutdown left nothing to save next time. The marks are now taken, and given back when the save fails. Open PR #2232 restores onlyprebuilt_changed; this restores the added count,prebuilt_changedandUSED_CHANGED.Testing
Test
a_failed_save_leaves_its_changes_to_the_nextfails if the restore drops the added count and passes with this change. It testsDirtytake and restore, not theErrarms ofsave().cargo test --workspace --lockedpasses apart from known flakes:modules::dstorage::tests::a_page_list_filled_after_its_request_startsfails now and then onmaintoo, and so does a parallel-run flake invictory-gpu's lib tests (watch::anddescriptor::host::tests, 2 of 40 runs on pristinemain).A save that keeps failing now retries every 20 s with a warning each time. It touches
save()like #2326 and #2328 do and conflicts with them only in adjacent test blocks inlibrary.rs. Not tried: a run in the game.AI-assisted.