Skip to content

Encapsulate write endpoints in a transaction #576

@epompeii

Description

@epompeii

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions