[infinispan-issues] [JBoss JIRA] (ISPN-5379) Persistence with stringKeyedJdbcStore throwing ConcurrentModificationException while adding data to cache

Dan Berindei (JIRA) issues at jboss.org
Thu Apr 16 18:33:18 EDT 2015


     [ https://issues.jboss.org/browse/ISPN-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Berindei updated ISPN-5379:
-------------------------------
    Status: Open  (was: New)


>  Persistence with stringKeyedJdbcStore throwing ConcurrentModificationException while adding data to cache
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ISPN-5379
>                 URL: https://issues.jboss.org/browse/ISPN-5379
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core, Loaders and Stores
>    Affects Versions: 6.0.2.Final
>            Reporter: Dan Berindei
>            Assignee: Dan Berindei
>             Fix For: 7.2.0.Final
>
>
> From Dennis Reed:
> A  ConcurrentModificationException in the CacheWriter interceptor during a commit.
> java.util.ConcurrentModificationException
>     at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
>     at java.util.LinkedList$ListItr.next(LinkedList.java:886)
>     at org.infinispan.interceptors.CacheWriterInterceptor.store(CacheWriterInterceptor.java:210)
>     at org.infinispan.interceptors.CacheWriterInterceptor.commitCommand(CacheWriterInterceptor.java:115)
> The code is looping through the modifications associated with the transaction:
>      List<WriteCommand> modifications = ctx.getCacheTransaction().getAllModifications();
>      ...
> 210: for (WriteCommand cacheCommand : modifications) {
> The transaction's modification list is stored as a synchronized list with a comment "we need to synchronize this collection to be able to get a valid snapshot from another thread during state transfer".
> But this thread is not doing state transfer, and I'd assume "get a valid snapshot" wouldn't include modification?
> Is it valid for this list to be modified from another thread (in which case all iterations should be synchronized), or is something modifying it incorrectly?



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the infinispan-issues mailing list