I read these articles:
These last few articles talked about
innodbSome of the transaction locks are used, and it feels like they all say that when placing an order, the inventory will be reduced by the specified line (
FOR UPDATE) this kind of situation, that is to say, at the same time, there can only be one order transaction in execution, that is to say, this is serial?
This is just like going to the supermarket to check out one by one. The cashier can only check out one by one, while we can only wait in line with baskets.
This is the same time of the database. What is the concept of time, the same second, the same millisecond? Or is there no concept of time at all, just the concept of space, that is, only one transaction is executing at the same time and space, and the others are waiting in line?
Aren’t computers just for the liberation of mankind? What’s the difference between now and when the supermarket checks out, we have to wait in line? Isn’t that Low?
Does Taobao’s hundreds of millions of transactions per second also “submit” orders one by one? If so, how is it possible to have such a large volume of transactions in one second?
In addition, help me look at this problem:http://segmentfault.com/q/1010000004062810
Thank you very much!
Asynchronous can solve the problem you said.
Multiple toll gates are opened through distribution and clustering. You can solve your problem.