Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-784

ArrayIndexOutOfBoundsException in BitVector.get whilst adding a doc resulting in corrupt index

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1
    • Component/s: core/index
    • Labels:
      None
    • Environment:
    • Lucene Fields:
      New

      Description

      We have got the following exception during adding docs to an index in our production environment and the index now seems corrupted:

      Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
      at org.apache.lucene.util.BitVector.get(BitVector.java:63)
      at org.apache.lucene.index.SegmentReader.isDeleted(SegmentReader.java:288)
      at org.apache.lucene.index.SegmentMerger.mergeFields(SegmentMerger.java:185)
      at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:88)
      at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:709)
      at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:686)
      at org.apache.lucene.index.IndexWriter.maybeMergeSegments(IndexWriter.java:674)
      at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:479)
      at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:462)
      at com.kaboodle.subsystem.content.impl.lucene.LuceneIndexingService.indexItemEntry(LuceneIndexingService.java:2272)
      at com.kaboodle.subsystem.content.impl.lucene.LuceneIndexingService.indexItem(LuceneIndexingService.java:1500)
      at com.kaboodle.subsystem.content.impl.lucene.LuceneIndexingService.update(LuceneIndexingService.java:823)
      at com.kaboodle.subsystem.content.impl.lucene.LuceneIndexingService$1.process(LuceneIndexingService.java:397)
      at com.kaboodle.subsystem.content.impl.AbstractQueueHandler.process(AbstractQueueHandler.java:131)
      at com.kaboodle.subsystem.content.impl.lucene.LuceneIndexingService.indexContent(LuceneIndexingService.java:393)
      at sun.reflect.GeneratedMethodAccessor1261.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
      at $Proxy6.indexContent(Unknown Source)
      ... 19 more

      Now the index appears to be corrupted since any search also gets an ArrayOutOfBoundsException:

      Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
      at org.apache.lucene.util.BitVector.get(BitVector.java:63)
      at org.apache.lucene.index.SegmentTermDocs.read(SegmentTermDocs.java:133)
      at org.apache.lucene.index.MultiTermDocs.read(MultiReader.java:365)
      at org.apache.lucene.search.TermScorer.next(TermScorer.java:105)
      at org.apache.lucene.search.DisjunctionSumScorer.advanceAfterCurrent(DisjunctionSumScorer.java:151)
      at org.apache.lucene.search.DisjunctionSumScorer.next(DisjunctionSumScorer.java:125)
      at org.apache.lucene.search.BooleanScorer2.next(BooleanScorer2.java:322)
      at org.apache.lucene.search.DisjunctionSumScorer.advanceAfterCurrent(DisjunctionSumScorer.java:151)
      at org.apache.lucene.search.DisjunctionSumScorer.skipTo(DisjunctionSumScorer.java:215)
      at org.apache.lucene.search.ReqOptSumScorer.score(ReqOptSumScorer.java:75)
      at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:327)
      at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:291)
      at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:132)
      at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:99)
      at org.apache.lucene.search.Searcher.search(Searcher.java:130)
      at com.kaboodle.subsystem.content.impl.lucene.LuceneSearchService.search(LuceneSearchService.java:1045)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kmccammon Keiron McCammon
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: