Skip to content

Transactions fixes - #129

Open
onelxj wants to merge 2 commits into
mainfrom
onelxj.database_check_inserted_race
Open

Transactions fixes#129
onelxj wants to merge 2 commits into
mainfrom
onelxj.database_check_inserted_race

Conversation

@onelxj

@onelxj onelxj commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

2 fixes were found during Matt's debugging and my own benchmarks. Check each commit individually.

The test introduced in the first commit was able to reproduce the CHECK(inserted) issue on the CI, but it is a pretty complicated race between transactions start, lookup and create which is pretty tough to repro deterministically, so I left the original test which should cover both issues more or less deterministically.

@aviator-app

aviator-app Bot commented Aug 14, 2026

Copy link
Copy Markdown

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR is not ready to merge (currently in state pending): this PR has not been approved.

Pending Status Checks

  • Build and Test Development Containers / Container - Build, Test, and (maybe) Push (missing)
  • Build public repo for Linux arm64 / GitHub-hosted Runner (missing)
  • Build public repo for Linux x86_64 / GitHub-hosted Runner (missing)
  • Build public repo for MacOS arm64 / Build Reboot for MacOS (missing)
  • Check Code Style / GitHub-hosted Runner (missing)
  • ⏳ 3 other pending tests

See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@onelxj onelxj changed the title Onelxj.database check inserted race Transactions fixes Aug 14, 2026
@onelxj
onelxj force-pushed the onelxj.database_check_inserted_race branch from e0c739e to 4e972fe Compare August 14, 2026 13:58
There is a race condition in database between the
transaction lookup and the transaction creation, so
if 2 threads running shared transactions will both
pass the lookup and have no result, then they'll
try to create and only one will win and second
will crash the DB server with `CHECK(inserted)`.
@onelxj
onelxj force-pushed the onelxj.database_check_inserted_race branch from 4e972fe to dc744e8 Compare August 14, 2026 14:08
@onelxj
onelxj requested a review from benh August 14, 2026 14:09
@onelxj onelxj self-assigned this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant