Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1482

ConcurrentModificationException in FileStore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.17
    • 0.18
    • core
    • None

    Description

      At times with load ConcurrentModificationException is being seen in FileStore

      Caused by: java.util.ConcurrentModificationException: null
      	at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
      	at java.util.LinkedList$ListItr.next(LinkedList.java:886)
      	at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.loadSegment(FileStore.java:285)
      	at org.apache.jackrabbit.oak.plugins.segment.AbstractStore.readSegment(AbstractStore.java:85)
      	at org.apache.jackrabbit.oak.plugins.segment.Segment.getSegment(Segment.java:266)
      	at org.apache.jackrabbit.oak.plugins.segment.Record.getSegment(Record.java:109)
      	at org.apache.jackrabbit.oak.plugins.segment.BlockRecord.read(BlockRecord.java:52)
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentStream.read(SegmentStream.java:163)
      	at com.google.common.io.ByteStreams.read(ByteStreams.java:828)
      	at com.google.common.io.ByteStreams.readFully(ByteStreams.java:695)
      	at org.apache.jackrabbit.oak.plugins.index.lucene.OakDirectory$OakIndexFile.loadBlob(OakDirectory.java:174)
      

      Looking at the code of FileStore[1] in writeSegment call the list of data/bulk files gets modified. This method is marked as synchronized but other methods loadSegment are not synchronized. This might cause the iterators to fail. Probably using CopyOnWriteArrayList would help

      https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java#L301

      Attachments

        Activity

          People

            jukkaz Jukka Zitting
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: