Optimistic locking, also referred to as optimistic concurrency control, allows multiple concurrent users to attempt to update the same resource. There are two common ways to implement optimistic locking: version number and timestamp. Version number is generally considered to be a better option because the server clock can be inaccurate over time. We explain how optimistic locking works with version number.
Why do all explanations of OCC use the example of a transaction updating only one row? How would OCC work in the case of a transactional update of, for example, two rows?
Why do all explanations of OCC use the example of a transaction updating only one row? How would OCC work in the case of a transactional update of, for example, two rows?