Transactions fixes - #129
Open
onelxj wants to merge 2 commits into
Open
Conversation
Current Aviator status
This PR is not ready to merge (currently in state pending): this PR has not been approved. Pending Status Checks
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
force-pushed
the
onelxj.database_check_inserted_race
branch
from
August 14, 2026 13:58
e0c739e to
4e972fe
Compare
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
force-pushed
the
onelxj.database_check_inserted_race
branch
from
August 14, 2026 14:08
4e972fe to
dc744e8
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.