[infinispan-issues] [JBoss JIRA] (ISPN-8959) Infinispan occasionally fails to locate an entry in a cache store when using a bounded data container
Paul Ferraro (JIRA)
issues at jboss.org
Fri Mar 16 13:51:00 EDT 2018
Paul Ferraro created ISPN-8959:
----------------------------------
Summary: Infinispan occasionally fails to locate an entry in a cache store when using a bounded data container
Key: ISPN-8959
URL: https://issues.jboss.org/browse/ISPN-8959
Project: Infinispan
Issue Type: Bug
Components: Core, Eviction
Affects Versions: 9.2.0.Final
Reporter: Paul Ferraro
Assignee: Paul Ferraro
Priority: Blocker
If a Cache.get(...) needs to load an entry from the cache store, it uses the PersistenceUtil.loadAndStoreInDataContainer(...) method.
The method utilizes a DataContainer.compute(...) operation. However, when the data container is backed by a caffeine BoundedLocalCache, the key of the ComputeAction will not be the same as the key from the command, since caffeine uses weak references for keys which use the hashCode returned by System.identityHashCode(...). Since loadAndStoreInDataContainer(...) method calls the loadAndCheckExpiration(...) method using the key from the ComputeAction instead of the key from the command, it will fail to locate the entry in the cache store.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the infinispan-issues
mailing list