-
Bug
-
Resolution: Done
-
Major
-
5.3.0.Final
Repeatable read transaction is not isolated when they read a non-existing key.
tm.begin()
cache.get(k) //returns null
//in the meanwhile a transaction writes on k and commits
cache.get(k) //return the new value. IMO, this is not valid for
REPEATABLE_READ isolation level!
//TODO add a test case for all the write operations (except put map because it does not read the old value)
tm.begin()
cache.get(k) //returns null (op#1)
//in the meanwhile a transaction writes on k and commits
write operation performed:
- put: must return the same value as op#1
- conditional put //if op#1 returns null the operation should be always successful (i.e. the key is updated, return true). Otherwise, the key remains unchanged (return false)
- replace: must return the same value as op#1
- conditional replace: replace should be successful if checked with the op#1 return value (return true). Otherwise, the key must remain unchanged (return false).
- remote: must return the same value as op#1
- conditional remove: the key should be removed if checked with the op#1 return value (return true). Otherwise, the key must remain unchanged (return false)
//TODO2: check if after a remove, the following get return null and the description above is still valid.