Skip to content

Add application-owned writer lock foundations - #7706

Draft
TheSentinel454 wants to merge 2 commits into
mainfrom
tornquist/osc-lock-foundation
Draft

TheSentinel454 wants to merge 2 commits into
mainfrom
tornquist/osc-lock-foundation

Conversation

@TheSentinel454

Copy link
Copy Markdown
Contributor

Summary

Buzz is moving database invariants from triggers and foreign keys into application-owned transaction protocols. This draft adds the first transition foundations while preserving all current database backstops.

  • Add shared community-write locks and matching exclusive deletion locks, with stable ordering for multi-community writes.
  • Add shared event-writer and exclusive replica-probe lock ordering around the existing heartbeat publication model.
  • Document the supported writer contract, reviewed backfill path, and transition gates.
  • Keep one replica-floor publication concept and remove an unrelated reconciliation-script edit found during review. This narrows the change rather than adding parallel protocols.

The blast radius is limited to new opt-in writer helpers plus lock acquisition in deletion and replica probing. Existing trigger and GUC enforcement remains authoritative, so callers can migrate in later pull requests.

Related issue

None found. This is the first implementation slice from the OSC migration plan.

Testing

No manual testing. CI covers the Rust checks and database tests added here.

Generated with Codex

TheSentinel454 and others added 2 commits September 17, 2026 09:49
Signed-off-by: tornquist <tornquist@squareup.com>
Co-authored-by: Codex <noreply@openai.com>
…tract

Signed-off-by: tornquist <tornquist@squareup.com>
Co-authored-by: Codex <noreply@openai.com>
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 4ab4f786085a23fe6126529861840eff6048ceee...d356c65e69ca00d41c59eb00e9d74ee7114e8943.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review d356c65e69ca00d41c59eb00e9d74ee7114e8943 to authorize a new review.
Any previous review applies only to its recorded range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant