Optimistic concurrency control: Difference between revisions

Content deleted Content added
Slamb (talk | contribs)
Delinked sandbox. This is not the same as the security term.
typo
Line 9:
2. '''VALIDATION''': When the client has completed editing of the values in its sandbox or cache, it initiates the storage of the changes back to the database. During validation, an algorithm checks if the changes to the data would conflict with either i) already-committed transactions in the case of ''Backward Validation Schemes'', or ii) currently executing transactions in the case of ''Forward Validation Schemes''. If a conflict exists, a Conflict Resolution Algorithm must be used to resolve the conflict somehow (ideally by minimizing the number of changes made by the user) or, as a last resort, the entire transaction can be aborted (resulting in the loss of all changes made by the user).
 
3. '''WRITE''': If there is no possibility of conflict, the transactionstransaction commits.
 
If there are few conflicts, validation can be done efficiently, and leads to better performance than other concurrency control methods. Unfortunately, if there are many conflicts, the cost of repeatedly restarting transactions, hurts performance significantly -- other [[non-lock concurrency control]] methods have better performance when there are many conflicts.