乐观锁是基于比较的无锁并发控制机制。
CAS
mvcc
The general idea is this:
Optimistic locking
Each table you want to implement concurrent access to need a new column: Version
. This column is usually an integer or a timestamp. Every time a record in the table changes, its version changes with it.
https://enterprisecraftsmanship.com/posts/optimistic-locking-automatic-retry/
原文地址:https://www.cnblogs.com/feng9exe/p/12162725.html
时间: 2024-10-13 22:48:33