This is an article on pessimistic and optimistic locking. A pessimistic lock rolls the whole of an interaction with a table row (from reading to updating) into one transaction, blocking others from altering the row until the transaction is committed or rolled back. In an optimistic lock their is double-checking to ensure that a row did not change between read and rewrite. A transaction will fail in an optimistic lock if there has been a change after all.
No comments:
Post a Comment