当使用乐观锁定策略时,它可以解决如下的并发问题:
| the first transaction started | | | | select a row | | | the second transaction started | update the row with version checking | | | select the same row | commit txn | | | update the row with version checking | | | | rolls back because version is dirty
但是,如果在极少数情况下,第二个事务中的更新是在第一个事务中的udpate之后但是在事务提交之前呢?
| the first transaction started | | | the second transaction started | select a row | | | select the same row …