Skip to content

Use writeWithoutTransaction when appropriate#53

Merged
atdrendel merged 4 commits intomainfrom
test-vacuum
Feb 1, 2024
Merged

Use writeWithoutTransaction when appropriate#53
atdrendel merged 4 commits intomainfrom
test-vacuum

Conversation

@atdrendel
Copy link
Copy Markdown
Contributor

@atdrendel atdrendel commented Jan 31, 2024

This pull request fixes SQLITE_BUSY errors caused by the shift to IMMEDIATE transactions.

Updating the transaction type from the default DEFERRED to IMMEDIATE exposed some issues with the way SQLite wrapped GRDB. SQLite was wrapping some writes in an unnecessary transaction. This caused issues because IMMEDIATE transactions immediately begin a write, meaning other writes will receive a SQLITE_BUSY error. Before applying the changes in this pull request, vacuuming and checkpointing tests failed when IMMEDIATE transactions were used.

@atdrendel atdrendel changed the title Test vacuum and immediate transactions Use writeWithoutTransaction when appropriate Feb 1, 2024
@atdrendel atdrendel merged commit 4563f1c into main Feb 1, 2024
@atdrendel atdrendel deleted the test-vacuum branch February 1, 2024 19:02
@atdrendel atdrendel mentioned this pull request Feb 1, 2024
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