]
Galder Zamarreño updated ISPN-3938:
-----------------------------------
Fix Version/s: 7.2.0.CR1
(was: 7.2.0.Beta2)
AdvancedAsyncCacheLoader.process() concurrency issues
-----------------------------------------------------
Key: ISPN-3938
URL:
https://issues.jboss.org/browse/ISPN-3938
Project: Infinispan
Issue Type: Bug
Components: Core, Loaders and Stores
Affects Versions: 6.0.0.Final
Reporter: Dan Berindei
Assignee: William Burns
Fix For: 7.2.0.CR1
{{AdvancedAsyncCacheLoader.process()}} calls {{advancedLoader().process()}} to collect
all the keys in the store, but the HashSet used to collect the keys it not thread-safe.
This can cause problems, e.g. during state transfer:
{noformat}
WARN cheTopologyControlCommand | ISPN000071: Caught exception when handling command
CacheTopologyControlCommand{cache=sessions, type=CH_UPDATE, sender=alfie-lt-46127,
joinInfo=null, topologyId=3, currentCH=DefaultConsistentHash{numSegments=60, numOwners=1,
members=[alfie-lt-46127]}, pendingCH=null, throwable=null,
viewId=1}java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926)
at java.util.HashMap$KeyIterator.next(HashMap.java:960)
at
org.infinispan.persistence.async.AdvancedAsyncCacheLoader.process(AdvancedAsyncCacheLoader.java:80)
at
org.infinispan.persistence.manager.PersistenceManagerImpl.processOnAllStores(PersistenceManagerImpl.java:414)
at
org.infinispan.statetransfer.StateConsumerImpl.invalidateSegments(StateConsumerImpl.java:910)
at
org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate(StateConsumerImpl.java:393)
at
org.infinispan.statetransfer.StateTransferManagerImpl.doTopologyUpdate(StateTransferManagerImpl.java:178)
at
org.infinispan.statetransfer.StateTransferManagerImpl.access$000(StateTransferManagerImpl.java:38)
at
org.infinispan.statetransfer.StateTransferManagerImpl$1.updateConsistentHash(StateTransferManagerImpl.java:100)
at
org.infinispan.topology.LocalTopologyManagerImpl.handleConsistentHashUpdate(LocalTopologyManagerImpl.java:191)
at
org.infinispan.topology.CacheTopologyControlCommand.doPerform(CacheTopologyControlCommand.java:152)
at
org.infinispan.topology.CacheTopologyControlCommand.perform(CacheTopologyControlCommand.java:124)
at
org.infinispan.topology.ClusterTopologyManagerImpl$3.run(ClusterTopologyManagerImpl.java:606)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
{noformat}