Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2313

Occasional ConcurrentModificationException in IndexProvider

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 4.0.0.Final
    • 4.0.0.Beta2
    • Query
    • None

    Description

      Occasionally I get this Exception during a query.

      I wasn't able to track it down as it doesn't seem to happen during debugging, so I can't provide mote info at this time.

      java.util.ConcurrentModificationException
      	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894)
      	at java.util.HashMap$ValueIterator.next(HashMap.java:922)
      	at org.modeshape.jcr.spi.index.provider.IndexProvider.onEachIndexInWorkspace(IndexProvider.java:436)
      	at org.modeshape.jcr.spi.index.provider.IndexProvider$BasicPlanner.applyIndexes(IndexProvider.java:503)
      	at org.modeshape.jcr.query.engine.IndexPlanners$2.applyIndexes(IndexPlanners.java:89)
      	at org.modeshape.jcr.query.optimize.AddIndexes.execute(AddIndexes.java:270)
      	at org.modeshape.jcr.query.optimize.RuleBasedOptimizer.optimize(RuleBasedOptimizer.java:46)
      	at org.modeshape.jcr.query.engine.ScanningQueryEngine.execute(ScanningQueryEngine.java:245)
      	at org.modeshape.jcr.RepositoryQueryManager$1.execute(RepositoryQueryManager.java:172)
      	at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:118)
      	at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:43)
      

      What I can tell is this:

      I created indexes in another session but in the same thread just before firing a query that causes the exception.
      All Indexes are being defined before any >affected< nodes for that index get created.
      Thread.sleep (tested up to 5000) in the Query thread (which is also the index definition thread in this case) doesn't help
      Maybe it is related to defining an index on [jcr:uuid] because I didn't get this error previously.

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            bes82 Bjoern Schmidt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: