Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.12.0
-
None
Description
The FastLRUCacheManager is the implementation of the EntityCacheManager. The EntityCacheManager interface uses the o.a.solr.util.RefCounted for getting the EntityCache object.
However the management of the RefCount of the FastLRUCacheManager implementation is not thread save. So under high load the actual ref count can get wrong values. Based on logs I observed negative values (resulting in close operations in the Cache) and also very high values (potentially resulting in Caches not being correctly garbage collected).
To fix this issue the FastLRUCacheManager.getCache(Object version) needs to be implemented in a thread save manner. Also the #close() method needs to be thread save.