Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

test: pin multi-row primary-key lock order - #182

Closed
pathscale wants to merge 1 commit into
masterfrom
test/multi-row-lock-order
Closed

test: pin multi-row primary-key lock order#182
pathscale wants to merge 1 commit into
masterfrom
test/multi-row-lock-order

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Summary

  • Add a deterministic regression test for generated multi-row update lock ordering.
  • Construct a non-unique index order whose first row is not primary key zero.
  • Hold that index-first row and verify the generated update registers the primary-key-zero lock before it blocks.
  • Verify the update resumes and applies uniformly after the predecessor lock is released.

Regression proof

  • Passes on current master, which snapshots, sorts, and deduplicates primary keys before locking.
  • Fails when applied to 9c0d98f^ with: the update followed secondary-index order instead of locking primary key zero first.

Performance

  • Test-only change. No production code or generated hot path changes.

Verification

  • cargo test --test mod worktable::lock_order::multi_row_update_locks_in_primary_key_order_not_index_order
  • cargo clippy --all-targets
  • cargo fmt --all -- --check

@pathscale

Copy link
Copy Markdown
Owner Author

Superseded by #187, which consolidated and merged the backend-selection and publication hardening work after the combined review and validation rounds.

@pathscale pathscale closed this Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant