Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Check concurrent issues #20

Open
3 tasks
eldimious opened this issue Jul 23, 2022 · 0 comments
Open
3 tasks

Check concurrent issues #20

eldimious opened this issue Jul 23, 2022 · 0 comments
Assignees

Comments

@eldimious
Copy link
Contributor

  • Scenario 1: When we update status we first try to find -> this can lead to concurrent issues -> we need either pessimistic or optimistic lock or just update
  • Scenario 2: Idempotent API -> avoid duplicated orders (we use unique constraint basket_id + proceed events) / payments (proceed events + unique constraint order_id + psp deduplicated key)
  • Scenario 3: Multiple uses try to order same product at same time -> pessimistic lock, optimistic lock, database constraint (stock constraint)
@eldimious eldimious self-assigned this Jul 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant