-
-
Notifications
You must be signed in to change notification settings - Fork 74
ClassCastException when concurrently computeIfAbsent on WiredCache #155
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
Comments
Jingxiao, many thanks for the detailed bug report. Sorry for the bad experience. That looks like a bug.
No. Because of the attached listener the cache uses a more complex processing scheme, which seems I take a look into it. |
This is a rather serious bug and also affects |
If curious, here some background information: Ironically, I introduced a testing harness for concurrency issues in 1.4 but only tested a few methods that I felt might be troublesome. The test for
Running the actor methods simultaneously is done by generic code. This should cover all aspects. It is able to reproduce the discovered bug. |
Fix released as 1.4.1.Final |
Version of Cache2k:1.4.0.Final
A
ClassCastException
occurs in the following simple unit test.If I
addListener
onCache2kBuilder
and aWiredCache
instance is built, the assertion at the end of the unit test on Exception count may fail with the following logs:If I comment the
addListener
part and theCache
instance falls back toHeapCache
, the unit test will pass and everything seems to be fine.Is there any other required configuration to be included when using
addListener
onCache2kBuilder
?The text was updated successfully, but these errors were encountered: