-
Bug
-
Resolution: Done
-
Major
-
3.0.8.Final, 3.1.0.Final
-
None
-
False
-
-
False
-
-
Ehcache v3 is designed to silently evict entries in off-heap storage when the maximum persistence size is reached. This can lead to unexpected behavior.
To combat this, we should register a CacheEventListener with each Ehcache instance and monitor for eviction events. Now unfortunately due to how Ehcache works, we can't rely on throwing an exception from within the listener, however, we can check the listener to see if an eviction was observed immediately after a put operation and raise an exception there in the connector thread.