This content has been marked as final.
Show 2 replies
-
1. Re: Pessimistic Locking and dirty reads
rvansa Mar 30, 2015 3:17 AM (in response to yairogen)With this flag, once you read the data it stays locked until the transaction in which you read the data commits. Therefore, processing of the second transaction is blocked. Naturally, this works only with pessimistic locking.
With optimistic locking, we remember version of entry read and when (and only if) the same transaction later updates this entry, it checks that it's updating the same version as was read. If another transaction modified the data in between, the transaction rollbacks. This is called write skew check.
-
2. Re: Pessimistic Locking and dirty reads
yairogen Mar 30, 2015 4:20 AM (in response to rvansa)Naturally, the locks are only for the same key, right?