Skip to content

fix(hub): serialize boot migrations with an advisory lock (CL-9605) - #1028

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-9605-e2e-migrate-race
Sep 30, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-9605-e2e-migrate-race

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Concurrent hub boots on one database raced on the platform SQL's CREATE TYPE (pg_type_typname_nsp_index): the present-check and the one-shot migration were not atomic.

migrateHub now runs under a transaction-scoped pg_advisory_xact_lock, so concurrent boots (e2e suites, rolling deploys) serialize.

Verified: CI=true bun run test:e2e green 5 times in a row locally.

Resolves CL-9605

Concurrent hub boots against one database raced on the one-shot platform
SQL's CREATE TYPE (pg_type_typname_nsp_index). Migrations now run under a
transaction-scoped Postgres advisory lock.
@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CL-9605

@TheGreatAxios
TheGreatAxios merged commit e9935c5 into main Sep 30, 2026
3 checks passed
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