2. Vector Concepts : Transaction Isolation Model : Optimistic Concurrency Control
 
Share this page                  
Optimistic Concurrency Control
Unlike some systems, Vector uses the optimistic concurrency control model. In this model, transactions are allowed to perform changes to the data without checking for conflicts possibly caused by other transactions that have committed in the meantime. Conflicts are checked only when a transaction commits. This refers not only to conflicts caused by changing the same data, but also to constraint violations that occur only as a result of two transactions committing (for example, two concurrent transactions inserting a record with the same UNIQUE field).
Compared to other approaches, optimistic concurrency control avoids locking records for concurrently working transactions. This results in good performance in cases where transactions typically do not conflict with each other.
The most visible aspect of optimistic concurrency control that sometimes causes problems for users accustomed to other solutions is that the conflicts are detected only at commit time. The application logic must take this into account.
For more information, see http://en.wikipedia.org/wiki/Optimistic_concurrency_control.