-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Near Cache: Race Condition in 3.1.6 #1861
Comments
Thanks for the report, is there a chance you can test this with 3.2-RC1, too? |
Thanks for this excellent report. I'm currently working on fixing some other tests. once done I'll have a look at this unless someone else picks it up. |
With 3.2-RC1 I get the following:
Exception in thread "put-if-absent-test5" java.lang.RuntimeException: Value should never be null here. We'll look into it. Will be fixed for the 3.2 release and we'll see how fast we can fix it for the 3.1 release. are in bugfixing mode.. so we'll polish them away quickly |
Cool, thanks for your work. Now, I spent some more time looking into this issue and while doing so, stumbled accross two other places where I think the code accessing the NearCache is not fully correct or could be improved. Since I'm not fully sure if it is a real issue (I only looked at the source code), should I point you to these two places here or open separate issues for them? Thanks and best, |
If it's not directly related to this *putIfAbsent() *race condition, then I On Tue, Feb 25, 2014 at 2:44 PM, Lukas Blunschi notifications@github.comwrote:
|
Okidoki, see new issue #1863 |
Well, back to this issue...
Assuming my two comments in the code above are correct, it looks like map.putIfAbsent() does not synchronously remove the NULL_OBJECT from the near cache. I tried to find where the invalidation of the near cache is triggered after the putIfAbsent(), unfortunately I was not able to discover it... I hope this still helps to solve the issue. Best, |
Hi @ahmetmircik it could well be that my fix for issue #1905 would also fix this issue here. Cheers, |
#1922 also solves this issue. Closing now. |
The aim is to make batch jobs more deterministic: all items are evicted at the end, regardless of the WM. Fixes #1801
GitOrigin-RevId: 0a908b2dd9c6b389c5afbc01ecdbe2146bea3a22
Hi,
we discovered a race condition which was introduced from 3.1.5 to 3.1.6. The following code reproduces the issue. Simply run it twice (meaning start it twice in parallel) on your development laptop. If you run it with 3.1.5 it works whereas it fails in 3.1.6.
This issue might be related to issue #1829
The map.get() before the map.putIfAbsent() combined with a near cache causes the problem.
Thanks for looking into this and best,
Lukas
The text was updated successfully, but these errors were encountered: