Serialize pipeline book appends across running instances #4891
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4891"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T13:04:49Z.
What it changes
The pipeline-book writer opens a file, seeks to the end, and remembers that length for rollback. Two running instances can open the same file and seek to the same offset. The second write can replace records written by the first.
This change lets one Windows handle write the file at a time, from the initial seek through any rollback. Other instances keep their records in the existing retry queue when the file is busy. Readers can still open the book during the write.
How it was tested
open_appendfrom main5fabb46eand812c0c63ee5cfdb723effc23edd4a8cd36a355abagainst a synthetic file with two independent handles. Releasee1251c31has the sameopen_appendas main.cargo xtask policy --stagedaccepted the source file.Checked for overlap
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-12-01T16:23:10Z.
Review: APPROVED
Reviewed crates/victory-gpu/src/pipeline/known.rs: opening the pipeline book with FILE_SHARE_READ via OpenOptionsExt::share_mode serializes concurrent writers from seek through potential set_len rollback while still allowing concurrent readers. Verified on Windows (RTX 5090): cargo test -p victory-gpu --lib pipeline::known::tests -- --test-threads=1 (14 passed, 0 failed).
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.