Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2428

ConcurrentModificationException in StateConsumerImpl

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Done
    • 5.2.0.Beta2
    • None
    • State Transfer
    • None

    Description

      In StateConsumerImpl.onTopologyUpdate(...) the transfersBySource.keySet() is iterated while under some conditions transfersBySource.remove(...) is called. As the iterated keySet is backed by the HashMap itself modifications during iteration are not permitted and I got

      java.util.ConcurrentModificationException
      	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894)
      	at java.util.HashMap$KeyIterator.next(HashMap.java:928)
      	at org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate(StateConsumerImpl.java:215)
      	at org.infinispan.statetransfer.StateTransferManagerImpl.doTopologyUpdate(StateTransferManagerImpl.java:186)
      	at org.infinispan.statetransfer.StateTransferManagerImpl.access$000(StateTransferManagerImpl.java:58)
      	at org.infinispan.statetransfer.StateTransferManagerImpl$1.updateConsistentHash(StateTransferManagerImpl.java:117)
      	at org.infinispan.topology.LocalTopologyManagerImpl.handleConsistentHashUpdate(LocalTopologyManagerImpl.java:194)
      	at org.infinispan.topology.CacheTopologyControlCommand.doPerform(CacheTopologyControlCommand.java:165)
      	at org.infinispan.topology.CacheTopologyControlCommand.perform(CacheTopologyControlCommand.java:137)
      	at org.infinispan.topology.ClusterTopologyManagerImpl$3.call(ClusterTopologyManagerImpl.java:554)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      	at java.lang.Thread.run(Thread.java:722)
      

      Attachments

        Activity

          People

            anistor Adrian Nistor
            rvansa1@redhat.com Radim Vansa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: