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

SegmentNotFoundException with Lucene

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: lucene
    • Labels:

      Description

      org.apache.jackrabbit.oak.plugins.index.lucene.OakDirectory keeps reference to node state for a long time, which is prone to SegmentNotFoundException when running revision cleanup with the CLEAN_OLD strategy.

      The following log file excerpt shows such a case where the reference in question was over 8 days old!

      04.03.2016 13:21:10.317 *ERROR* [qtp1507293688-116717] org.apache.jackrabbit.oak.plugins.segment.SegmentTracker Segment not found: a6f5ffe9-8d05-4e57-a953-492cb2105ca8. Creation date delta is 702992619 ms.
      org.apache.jackrabbit.oak.plugins.segment.SegmentNotFoundException: Segment a6f5ffe9-8d05-4e57-a953-492cb2105ca8 not found
      	at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.readSegment(FileStore.java:1016)
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentTracker.readSegment(SegmentTracker.java:209)
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentId.getSegment(SegmentId.java:149)
      	at org.apache.jackrabbit.oak.plugins.segment.Record.getSegment(Record.java:82)
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.getChildNodeMap(SegmentNodeState.java:85)
      	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.getChildNode(SegmentNodeState.java:383)
      	at org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder.getChildNode(ReadOnlyBuilder.java:196)
      	at org.apache.jackrabbit.oak.plugins.index.lucene.OakDirectory.fileLength(OakDirectory.java:101)
      	at org.apache.lucene.store.FilterDirectory.fileLength(FilterDirectory.java:63)
      	at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexMBeanImpl.dirSize(LuceneIndexMBeanImpl.java:202)
      	at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexMBeanImpl.access$100(LuceneIndexMBeanImpl.java:48)
      	at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexMBeanImpl$IndexStats.<init>(LuceneIndexMBeanImpl.java:165)
      	at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexMBeanImpl.getIndexStats(LuceneIndexMBeanImpl.java:70)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mduerig Michael Dürig
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: