Product oversell: v4.10

1 year ago
Howdy all,

We had a sale on our store today, and ended up selling 53 of a product we had 50 stock of.

Here is the stock quantity history for the product:
I've copied and pasted it to excel to highlight the 3 mistakes


https://pasteboard.co/HOXIYpR.jpg

We've been digging through the nop code to see if we can see how this could have happened.

So far it seems that the stock updates are trying to be non-deterministic (IE stock = stock -1, stock = stock +1), but we are not sure if this is some EF thing that causes the operation to happen in RAM on the web server, or if the -1 / + 1 operation is making it to the SQL server (where the update would cause a row level lock and work properly)

Some noteworthy observations:
- We have had sales last week with similar amounts of traffic where this did not happen.
- The product this happened on was marked as "Ship Separately" which is the only difference between this product and others we have had on sales.

Has anyone had any similar issues?

Harv
7 months ago
We checked the assumption of the "Ship Separately" attribute on version 4.20 and there was no problem with updating the warehouse. Perhaps the algorithm for obtaining such an error is not so straightforward - more information is required.
2 months ago
Hi

Has this been resolved in v4.2 of Nop? We're still experiencing this during high loads for sales/deals. This is a real problem for us since our sale items are very limited stock.

We are currently on v4.1.

Thanks!