Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Move database operations to specific dispatchers #1400

Merged
merged 1 commit into from
Jul 15, 2023

Conversation

chrisbanes
Copy link
Owner

Reads are limited to a dispatcher with a parallelism of 4, which is equal to the newly set maximum connection readers on the SQLite driver.

Writes are limited to a parallelism of 1, since that is what SQLDelight will do under the hood anyway. This seems to fix concurrency issues which result in crashes, such as sqldelight/sqldelight#4376.

@chrisbanes chrisbanes enabled auto-merge (squash) July 15, 2023 14:41
@chrisbanes chrisbanes changed the title Move database operations specific dispatchers Move database operations to specific dispatchers Jul 15, 2023
Reads are limited to a dispatcher with a parallelism of 4, which
is equal to the newly set maximum connection readers on the SQLite
driver.

Writes are limited to a parallelism of 1, since that is what SQLDelight
will do under the hood anyway. This seems to fix concurrency issues
which result in crashes, such as sqldelight/sqldelight#4376.
@chrisbanes chrisbanes force-pushed the cb/ios-sqlite-concurrency branch from 07ae3e2 to c11bfcd Compare July 15, 2023 17:22
@chrisbanes chrisbanes merged commit 9f990ec into main Jul 15, 2023
@chrisbanes chrisbanes deleted the cb/ios-sqlite-concurrency branch July 15, 2023 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant