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

Encapsulate write endpoints in a transaction #576

Open
epompeii opened this issue Feb 8, 2025 · 0 comments
Open

Encapsulate write endpoints in a transaction #576

epompeii opened this issue Feb 8, 2025 · 0 comments

Comments

@epompeii
Copy link
Member

epompeii commented Feb 8, 2025

Originally, the SQLite database connection lock was held throughout the entirety of each REST call. As things scaled, this led to inconsistent performance if another large query was running.

This approach is still used in critical sections of the code that need to guarantee atomicity. However, it would be better to let the database handle this via a transaction: https://docs.diesel.rs/2.0.x/diesel/connection/trait.Connection.html#method.transaction

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

No branches or pull requests

1 participant