Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
5.2.1.Final
-
None
Description
With a cache setup as clustering dist, 2 owners and async mode the Cache.remove API does not behave correctly. Cache.remove(key) should return the old value and Cache.remove(key, value) should return true if the entry was removed. Both methods only work correctly if invoked on the primary owner of the key. If invoked on another node remove(key) returns null every time and remove(key,value) returns false every time. The Infinispan documentation says that in async mode these operations should work as expected. https://docs.jboss.org/author/display/ISPN/Asynchronous+Options
Complete cache config:
<namedCache name="distributed">
<!-- Used to register JMX statistics in any available MBean server -->
<jmxStatistics enabled="true" />
<clustering mode="dist">
<stateTransfer fetchInMemoryState="true" timeout="20000" />
<hash numOwners="2"/>
<async/>
</clustering>
<locking isolationLevel="READ_COMMITTED"
lockAcquisitionTimeout="15000" useLockStriping="false" />
<eviction maxEntries="10000" strategy="LRU" />
<expiration maxIdle="3600000" wakeUpInterval="5000"/>
<storeAsBinary storeKeysAsBinary="true" storeValuesAsBinary="false" enabled="false" />
</namedCache>