Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix conn upgrade lock #1244

Merged
merged 1 commit into from
Mar 22, 2024
Merged

fix conn upgrade lock #1244

merged 1 commit into from
Mar 22, 2024

Conversation

MarinPostma
Copy link
Contributor

There was a deadlock when a conn failed to upgrade to a write lock, because there's nothing to rollback. This happens in scenarios such as:

C1: BEGIN
C1: SELECT * FROM test
C2: INSERT INTO TEST
C1: INSERT INTO TEST

C1 fails to upgrade it's lock, but it has a shallow lock in the connection manager. Aborting the transaction would have no effect because it doesn't own a sqlite lock.

@MarinPostma MarinPostma force-pushed the fix-conn-upgrade-lock branch 3 times, most recently from bee6645 to 4c66c36 Compare March 21, 2024 14:11
@MarinPostma MarinPostma added this pull request to the merge queue Mar 22, 2024
Merged via the queue into main with commit a26aebe Mar 22, 2024
16 checks passed
@MarinPostma MarinPostma deleted the fix-conn-upgrade-lock branch March 22, 2024 23:19
shopifyski pushed a commit to Shopify/libsql that referenced this pull request Mar 29, 2024
fix deadlock on read transaction upgrade
shopifyski pushed a commit to Shopify/libsql that referenced this pull request Mar 29, 2024
fix deadlock on read transaction upgrade
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