hle(dstorage): preserve sequence order across held page auto-submits #555

Manually merged
github merged 1 commit from github-bot/gh-551 into main 2026-11-28 03:42:41 +00:00 AGit
Owner

@⁠Sheffy007 on GitHub · 2026-11-28 03:15 UTC · original
Sheffy007:fix/dstorage-held-auto-submit-order → main · +100 −23 · 1 files · 1 commits · merged 2026-11-28 03:40 UTC

Summary

  • Assign monotonic seq numbers in enqueue order when commands first leave Lane::unsubmitted in Lanes::submit_as, storing (u64, Command) in Lane::held and keying Lane::reads and Lane::statuses by seq (BTreeMap<u64, ...>).
  • Check earlier held reads (Lane::held) alongside reads and running in Lane::flush so a status entry never completes ahead of an earlier held PAGE_DESTINATION read, while keeping each status segment's completion and failure reporting isolated from later auto-submitted reads.
  • Add unit test held_auto_submits_keep_sequence_order_status_boundaries_and_errors.

Verification

  • cargo xtask policy
  • cargo test --locked --target x86_64-apple-darwin -p victory-hle --lib -- dstorage --test-threads=1 (28 passed)
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings
  • cargo clippy --workspace --all-targets --all-features --locked --target x86_64-pc-windows-gnullvm -- -D warnings

Closes #554
Refs #460

cc @⁠Olima34

**@⁠Sheffy007** on GitHub · 2026-11-28 03:15 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/551) `Sheffy007:fix/dstorage-held-auto-submit-order` → `main` · +100 −23 · 1 files · 1 commits · merged 2026-11-28 03:40 UTC ## Summary - Assign monotonic `seq` numbers in enqueue order when commands first leave `Lane::unsubmitted` in `Lanes::submit_as`, storing `(u64, Command)` in `Lane::held` and keying `Lane::reads` and `Lane::statuses` by `seq` (`BTreeMap<u64, ...>`). - Check earlier held reads (`Lane::held`) alongside `reads` and `running` in `Lane::flush` so a status entry never completes ahead of an earlier held `PAGE_DESTINATION` read, while keeping each status segment's completion and failure reporting isolated from later auto-submitted reads. - Add unit test `held_auto_submits_keep_sequence_order_status_boundaries_and_errors`. ## Verification - `cargo xtask policy` - `cargo test --locked --target x86_64-apple-darwin -p victory-hle --lib -- dstorage --test-threads=1` (28 passed) - `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings` - `cargo clippy --workspace --all-targets --all-features --locked --target x86_64-pc-windows-gnullvm -- -D warnings` Closes #554 Refs #460 cc @⁠Olima34
Assign sequence numbers in enqueue order when commands first leave `Lane::unsubmitted` rather than deferring sequence assignment for held `PAGE_DESTINATION` reads and status entries until an explicit `Submit()`.

Without this, plain reads enqueued in a subsequent auto-submit received smaller sequence numbers than commands held from an earlier auto-submit, inverting read start order, delaying earlier status entries behind later reads, and letting earlier status entries steal later segment failures.

Closes #550
Refs #456
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 03:18:49 +00:00
github manually merged commit 9c001aa7b6 into main 2026-11-28 03:42:41 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-28 03:40 UTC · original · approved these changes

**@⁠LakshanSivakumar** on GitHub · 2026-11-28 03:40 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/551#pullrequestreview-6095505120) · **approved these changes**
This discussion has been locked. Commenting is limited to contributors.
No description provided.