Hi,

Your test is incorrect. This lines are not synchronized and can be reordered
with each other and with the validation that happens in another thread:

simpleCacheValidationWithLock.setIndex(i - 1);
simpleCacheValidationWithLock.setValueToValidate(valueCounter);

After I moved them into the synchronized block, test always passes.

BTW, for such transactional updates it's better to use
PESSIMISTIC/REPEATABLE_READ transactions:
https://apacheignite.readme.io/docs/transactions

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Getting-previous-value-in-cache-immediately-after-performing-an-unlock-tp10236p10254.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to