[Database] concurrency control and locking problems

Problems caused by concurrent transactions:

1. The lost update : T1 and T2 simultaneously read and modify the same data, the results submitted covers T2 T1 submitted results, results in a modification T1 is lost .

2. Dirty read : T1 modify the data, read the same data T2, Tl rollback case, inconsistent data T2 and the read data in the database , i.e. to read the dirty data

3. Non-repeatable read : A transaction multiple times the same data, but in this transaction is not over, the second transaction of this data has been modified, resulting in a transaction both times the same query read data is not the same .

4. Magic Reading : non-repeatable reads and conditions the same, but the condition because the number of additions and changes before and after the read result in different records .

 

Guess you like

Origin www.cnblogs.com/guangluwutu/p/12622502.html
Recommended