Skip to content

How does Waterline handle update concurrency ? #5328

@girishla

Description

@girishla

Apologies if this is just a silly noob question.
I was wondering how Waterline handles concurrent updates to the same record by different users.

like so...

  1. User A executes findone(id=1)
  2. User B executes findone(id=1)
  3. User A and B are both simultaneously making changes to the exact same record albeit different changes.
  4. User A executes save()
  5. User B also executes save()

Depending on which save() is committed to the DB first, one user will lose their changes because it will be overwritten by the second one.

Is there support for handling this scenario in Waterline ?

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