Skip to content

Use async locks in datastore, nix asyncify #3939

@gefjon

Description

@gefjon

Due to our use of non-async locks in the datastore, we have to asyncify i.e. spawn_blocking every time we acquire a transaction. This is bad for several reasons, including the non-zero overhead of spawn_blocking and the fact that procedures can acquire transactions from the database worker cores, whose single-core Tokio workers are not properly configured to run blocking threads. Instead, we should just use async-aware locks in our datastore, and await acquiring them.

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