Skip to content

WPB-22954: migrate mls-commit-locks to PostGreSQL - #5415

Open
blackheaven wants to merge 1 commit into
developfrom
gdifolco/WPB-22954-migration-postgres-mls-commit-locks
Open

WPB-22954: migrate mls-commit-locks to PostGreSQL#5415
blackheaven wants to merge 1 commit into
developfrom
gdifolco/WPB-22954-migration-postgres-mls-commit-locks

Conversation

@blackheaven

Copy link
Copy Markdown
Contributor

https://wearezeta.atlassian.net/browse/WPB-22954

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

Migrate the MLS commit-lock store (galley) from Cassandra to PostgreSQL
using the dual-write + background-worker pattern, following the CodeStore
recipe. The Postgres acquire replicates Cassandra's IF NOT EXISTS USING TTL
via INSERT ... ON CONFLICT DO UPDATE WHERE expires_at < now() RETURNING,
honoring both CAS mutual exclusion and TTL expiry (a pure DO NOTHING would
leave an expired lock blocking its (group_id, epoch) forever, since Postgres
has no TTL reaper). Adds Postgres/DualWrite/Migration interpreters, a
migration flag + metrics, helm/config/docs wiring, schema migration, and an
integration test.
@blackheaven
blackheaven requested review from a team as code owners August 4, 2026 16:11
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Aug 4, 2026

@akshaymankar akshaymankar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to migrate these locks? Can we not just use some pg advisory locks instead of creating a table?

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

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants