--- update the database concurrency problems may arise missing

Today, encountered a problem, is not isolated from the four databases, as well as to isolate the problem: We often know is that dirty reads, non-repeatable reads and phantom reads.

But today I learned that a new problem that may arise is: lost updates

Reference: http://www.pianshen.com/article/9331159795/

https://blog.csdn.net/huangyueranbbc/article/details/84304682

1. Update loss (LostUpdate): A
and B transactions to execute concurrently, A transaction execution after the update, submitted; B transaction after transaction updates A, B before the end of the transaction have done the update operations on the rows of data, then rolled back, the update operation twice lost.

The first lost update (rollback lost, Lost update).
A during a transaction, the transaction data is updated to B; A withdrawn after the transaction, the transaction data covering B has been submitted.
SQL92 does not define this phenomenon, the standard definition of isolation all sectors are allowed to first class lost updates occur.

 

The second category is missing update (covering loss / update problem twice, Second lost update).
A during a transaction, the transaction data is updated to B; A submitted after the transaction, the transaction data covering B has been submitted.
The second category is missing updates, and non-repeatable read is actually the same kind of problem.

 

Guess you like

Origin www.cnblogs.com/levontor/p/10980164.html