Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.4, 4.0-ALPHA
    • Fix Version/s: 3.4, 4.0-ALPHA
    • Component/s: core/store
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      since we changed CFS semantics slightly closing a CFS directory on an error can lead to an exception. Yet, an empty CFS is still a valid CFS so for consistency we should allow CFS to be empty.
      here is an example:

      1 tests failed.
      REGRESSION:  org.apache.lucene.index.TestIndexWriterOnDiskFull.testAddDocumentOnDiskFull
      
      Error Message:
      CFS has no entries
      
      Stack Trace:
      java.lang.IllegalStateException: CFS has no entries
             at org.apache.lucene.store.CompoundFileWriter.close(CompoundFileWriter.java:139)
             at org.apache.lucene.store.CompoundFileDirectory.close(CompoundFileDirectory.java:181)
             at org.apache.lucene.store.DefaultCompoundFileDirectory.close(DefaultCompoundFileDirectory.java:58)
             at org.apache.lucene.index.SegmentMerger.createCompoundFile(SegmentMerger.java:139)
             at org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4252)
             at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3863)
             at org.apache.lucene.index.SerialMergeScheduler.merge(SerialMergeScheduler.java:37)
             at org.apache.lucene.index.IndexWriter.maybeMerge(IndexWriter.java:2715)
             at org.apache.lucene.index.IndexWriter.maybeMerge(IndexWriter.java:2710)
             at org.apache.lucene.index.IndexWriter.maybeMerge(IndexWriter.java:2706)
             at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3513)
             at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2064)
             at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2031)
             at org.apache.lucene.index.TestIndexWriterOnDiskFull.addDoc(TestIndexWriterOnDiskFull.java:539)
             at org.apache.lucene.index.TestIndexWriterOnDiskFull.testAddDocumentOnDiskFull(TestIndexWriterOnDiskFull.java:74)
             at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1277)
             at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1195)
      
      1. LUCENE-3279.patch
        5 kB
        Simon Willnauer

        Activity

        Hide
        Simon Willnauer added a comment -

        here is a patch

        Show
        Simon Willnauer added a comment - here is a patch
        Hide
        Simon Willnauer added a comment -

        I plan to commit this soon if nobody objects.

        Show
        Simon Willnauer added a comment - I plan to commit this soon if nobody objects.
        Hide
        Simon Willnauer added a comment -

        Committed to trunk in revision 1143766

        backported to 3.x in revision 1143775

        Show
        Simon Willnauer added a comment - Committed to trunk in revision 1143766 backported to 3.x in revision 1143775

          People

          • Assignee:
            Simon Willnauer
            Reporter:
            Simon Willnauer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development