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

feat(proposer): SQLite changes #159

Merged
merged 2 commits into from
Oct 10, 2024
Merged

feat(proposer): SQLite changes #159

merged 2 commits into from
Oct 10, 2024

Conversation

ratankaliani
Copy link
Member

@ratankaliani ratankaliani commented Oct 10, 2024

In SQLite, there can only be one write operation at a time.

Previously, this caused database is locked errors, which did not cause downtime on the application, but are good to handle more correctly.

Create a writeClient that uses setMaxOpenConnections to provide a Mutex for write queries, and a readClient with several open connections.

Optimizations from: https://kerkour.com/sqlite-for-servers, used https://entgo.io/docs/sql-integration/ for the ent integration.

@ratankaliani ratankaliani merged commit cacc6d5 into main Oct 10, 2024
5 checks passed
@ratankaliani ratankaliani deleted the ratan/db-lock branch October 10, 2024 20:33
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