Avoid unnecessary writes during migration repair - #33687
Merged
copyberry[bot] merged 1 commit intoJul 16, 2026
Merged
Conversation
## Why Opening a database with current migration history should not require SQLite's writer slot. The legacy recency repair previously issued an `UPDATE` even when there was nothing to repair, so it could fail while another connection held the writer slot. ## What changed Check `_sqlx_migrations` for the legacy version and checksum before issuing the repair update, and return early when the current recency migration is already recorded. ## Testing Add a WAL-mode regression test that holds the writer slot on a second connection and verifies that current migration history needs no write access. GitOrigin-RevId: 76649213912b510df42a836cf8ed7f84a7c70eb5
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/76649213912b510df42a836cf8ed7f84a7c70eb5
branch
from
July 16, 2026 20:56
441b663 to
18110b8
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/76649213912b510df42a836cf8ed7f84a7c70eb5
branch
July 16, 2026 20:57
daveletourneau
temporarily deployed
to
issue-triage
July 16, 2026 21:05 — with
GitHub Actions
Inactive
daveletourneau
temporarily deployed
to
issue-triage
July 16, 2026 21:05 — with
GitHub Actions
Inactive
daveletourneau
temporarily deployed
to
issue-triage
July 16, 2026 21:05 — with
GitHub Actions
Inactive
daveletourneau
temporarily deployed
to
issue-triage
July 16, 2026 21:06 — with
GitHub Actions
Inactive
vincent-thomas
temporarily deployed
to
issue-triage
July 16, 2026 21:36 — with
GitHub Actions
Inactive
vincent-thomas
temporarily deployed
to
issue-triage
July 16, 2026 21:36 — with
GitHub Actions
Inactive
vincent-thomas
temporarily deployed
to
issue-triage
July 16, 2026 21:36 — with
GitHub Actions
Inactive
vincent-thomas
temporarily deployed
to
issue-triage
July 16, 2026 21:37 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoid unnecessary writes during migration repair
Why
Opening a database with current migration history should not require SQLite's
writer slot. The legacy recency repair previously issued an
UPDATEeven whenthere was nothing to repair, so it could fail while another connection held the
writer slot.
What changed
Check
_sqlx_migrationsfor the legacy version and checksum before issuing therepair update, and return early when the current recency migration is already
recorded.
Testing
Add a WAL-mode regression test that holds the writer slot on a second
connection and verifies that current migration history needs no write access.