Skip to content

Unsafe read for update #588

@ayushjain17

Description

@ayushjain17

Issue

in most places we are reading data which is meant for update either outside transaction or inside transaction, but the read data is not locked for further reads which can lead to missed updates as the data being committed later on would have done so based on old data

Solution

Read data meant for dictating updates inside transaction with FOR UPDATE constraint (via diesel's .for_update() to lock the data

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions