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
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?