Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Checkout Block: Mitigate and test for concurrency issues when reserving stock #1652

Closed
2 of 3 tasks
mikejolley opened this issue Jan 27, 2020 · 0 comments · Fixed by #1778
Closed
2 of 3 tasks

Checkout Block: Mitigate and test for concurrency issues when reserving stock #1652

mikejolley opened this issue Jan 27, 2020 · 0 comments · Fixed by #1778
Assignees
Labels
focus: rest api Work impacting REST api routes. type: enhancement The issue is a request for an enhancement.

Comments

@mikejolley
Copy link
Member

mikejolley commented Jan 27, 2020

Introduced in #1425, the API creates draft orders during the checkout flow which also help reserve stock during checkout for a customer.

Core team have been working on a similar system for putting holds on stock which attempts to mitigate concurrency issues (too much stock being reserved if 2 or more requests come in simultaneously).

Since there is benefit to rolling out changes in blocks first, we should (with @woocommerce/proton and @vedanshujain) ensure the solution in blocks is flexible enough to be the solution used by core too, and ensure we have a testing tool to confirm this works.

TODO:

  • Review current stock reservation table solution, align with core
  • Add concurrency testing tool
  • Implement protection against concurrency issues
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: rest api Work impacting REST api routes. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant