-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store pickup orders race condition: reserve source items QTY #2032
Milestone
Comments
novikor
changed the title
For Orders placed with Store Pickup - Skip the SSA step
Store pickup orders race condition: reserve source items QTY
May 11, 2019
novikor
added a commit
that referenced
this issue
May 11, 2019
Decrement source item qty if its reserved by orders placed using its source
4 tasks
novikor
added a commit
that referenced
this issue
May 18, 2019
Renamed: $sourceCode => $pickupLocationCode
Merged in #2237. |
ishakhsuvarov
pushed a commit
that referenced
this issue
Nov 22, 2019
Decrement source item qty if its reserved by orders placed using its source
ishakhsuvarov
pushed a commit
that referenced
this issue
Nov 22, 2019
Renamed: $sourceCode => $pickupLocationCode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Race condition between orders
To prevent a race condition between orders. Which could happen in a next case:
The "Salable Quantity" on "Custom Stock" is 10 for SKU-1. "Custom Stock" consists of three sources:
Altogether it gives us 5 + 4 + 1 = 10
Now there are 2 Customers coming to the site to place orders:
With current behaviour of Source Selection Algorithm it could happen that if Customer's 1 order would be processed first, the SSA may suggest to make Source deduction from "Source A" which will lead to insufficient Quantity of SKU-1 (
5 - 2 < 4
) to fulfill the order placed by Customer 2.To prevent this situation it's proposed to apply a rule that Store Pickup orders have higher priority than others, and SSA should work not with Source Availability Quantity, but with
Source Availability Quantity minus all store pickup ordered quantities
. In the case above it means that SSA for Customer 1 order should take Order placed by Customer 2 into account even so Order 2 was placed later, and the inbound data for SSA would be:Source A: 5 - 4 = 1
(subtract all store pickup items for this Source)https://github.com/magento-engcom/msi/wiki/Support-of-Store-Pickup-for-Multi-Source-Inventory#Race-condition-between-orders
The text was updated successfully, but these errors were encountered: