Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Guarantee stale reads from Map inside a transaction, when NearCache and delayed MapStore enabled, 3.7.1/3.7.2 #9248
If you have a map with NearCache enabled and a MapStore and your store implementation is a little bit clunky (or you have reasonable write delay) then you will get stale reads inside a transaction with simple condition: if you ever try to GET this key outside of transaction first.
Disabling NearCache solves the issue.
It looks fixed in master branch already but this could be reproduced in current 3.7.3 branch.
I have to look into this in detail, but my first guess would be that the invalidation unification by @ahmetmircik fixed this. But this is no candidate for a backport, since it changed the behavior of the invalidations on members too much (they are now executed asynchronously in the background instead of synchronously within the method call).