Jump to content

what will happen if two order placed simultaneously


charlestcr

Recommended Posts

One will be placed before the order and the other order will be rejected as not having enough product in stock. The orders table is locked when an order is being written to the database, so when the other order will be placed in a wait state for a few milliseconds while this is happening, then when the first order is done, the second will start to process and check the stock. There will be a stock error so it will kick them out. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...