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

feat: gate synchronized page access - #183

Closed
pathscale wants to merge 1 commit into
masterfrom
fix/safe-row-publication
Closed

feat: gate synchronized page access#183
pathscale wants to merge 1 commit into
masterfrom
fix/safe-row-publication

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Summary

  • add an opt-in safe-concurrent-reads correctness mode
  • place a table-wide read/write barrier around archived page-byte reads and mutations
  • cover in-place updates, ghost publication, raw snapshots, page reuse, and vacuum row moves/resets
  • compile the barrier out of default builds so the existing low-latency path is unchanged

Performance

Five alternating copied-binary benchmark pairs (30 samples, 0.5 s warm-up, 1 s measurement) found:

  • simple_select_by_pk: +1.2% to +2.3%, median +1.5%
  • simple_update: -0.9% to +1.0%, median +0.2% (noise-sized)

The enabled mode also intentionally serializes page mutations, so write-heavy concurrent workloads can see a larger throughput cost. The feature is therefore off by default.

Verification

  • cargo test
  • cargo test --features safe-concurrent-reads
  • cargo clippy --all-targets -- -D warnings
  • cargo clippy --all-targets --features safe-concurrent-reads -- -D warnings
  • cargo fmt --check

The feature-gated regression test pauses publication after one field changes and verifies that a concurrent reader cannot pass the barrier or observe the incomplete row; after unghosting, it sees the complete row.

@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