Retry failed pipeline cache saves #640

Closed
github-bot wants to merge 1 commit from gh-pr/640/head into gh-pr/640/base
Owner

@⁠Fluxxer763664 on GitHub · 2026-11-24 06:04 UTC · original
Fluxxer763664:fix/retry-pipeline-cache-save → main · +31 −22 · 1 files · 1 commits · closed without merging

This fix lets VIctory retry saving its pipeline cache after a failed write. The Windows GPU suite passed 46 tests, and the fix passed three simulated write-failure scenarios. No game files were used. AI-assisted.

**@⁠Fluxxer763664** on GitHub · 2026-11-24 06:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/640) `Fluxxer763664:fix/retry-pipeline-cache-save` → `main` · +31 −22 · 1 files · 1 commits · closed without merging This fix lets VIctory retry saving its pipeline cache after a failed write. The Windows GPU suite passed 46 tests, and the fix passed three simulated write-failure scenarios. No game files were used. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:11:08 +00:00
github-bot closed this pull request 2026-11-26 04:11:08 +00:00
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 11:41 UTC · original

Independent verification & code review on Windows 11 Pro (build 26100) + AMD Radeon RX 9060 XT (RDNA4, driver 32.0.32029.2010, Rust 1.98.1), cleanly merged onto main (ffe310e):

  • cargo xtask policy: PASS (154 files ok)
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: PASS
  • cargo clippy -p victory-gpu --all-targets --features diagnostics --locked -- -D warnings: PASS
  • cargo test -p victory-gpu --locked: 50 passed, 0 failed, 1 ignored

Diff review (crates/victory-gpu/src/pipeline/library.rs): clean and deadlock-free:

  • Holding LAST across both write_atomically calls prevents concurrent save() calls from racing on the shared .tmp filenames while keeping the lock order strictly LAST -> library / LAST -> USED (never acquiring LAST from inside either).
  • Subtracting added only on Ok(()) preserves both failed-save retry state and any pipelines stored concurrently during disk I/O, and restoring USED_CHANGED on serialize/write failure avoids silently dropping early-pipeline updates.
  • Note: PR #72 also targets retry-on-write-failure in library.rs, so maintainers may want to pick one of #640 or #72.

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 11:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/640#issuecomment-7130418587) Independent verification & code review on Windows 11 Pro (build 26100) + AMD Radeon RX 9060 XT (RDNA4, driver `32.0.32029.2010`, Rust `1.98.1`), cleanly merged onto `main` (`ffe310e`): - `cargo xtask policy`: PASS (`154 files ok`) - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings`: PASS - `cargo clippy -p victory-gpu --all-targets --features diagnostics --locked -- -D warnings`: PASS - `cargo test -p victory-gpu --locked`: **50 passed, 0 failed, 1 ignored** Diff review (`crates/victory-gpu/src/pipeline/library.rs`): clean and deadlock-free: - Holding `LAST` across both `write_atomically` calls prevents concurrent `save()` calls from racing on the shared `.tmp` filenames while keeping the lock order strictly `LAST -> library` / `LAST -> USED` (never acquiring `LAST` from inside either). - Subtracting `added` only on `Ok(())` preserves both failed-save retry state and any pipelines stored concurrently during disk I/O, and restoring `USED_CHANGED` on serialize/write failure avoids silently dropping early-pipeline updates. - Note: PR #72 also targets retry-on-write-failure in `library.rs`, so maintainers may want to pick one of #640 or #72. *AI-assisted; synthetic tests only, no game files.*
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:26 UTC · original

Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #72. Same retry-after-failed-save change as #72 without its unique temp files or tests.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/640#issuecomment-7148516002) Automated triage for the maintainers. Closing because another open pull request covers the same change. See #72. Same retry-after-failed-save change as #72 without its unique temp files or tests. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!640
No description provided.