Lucene - Core
  1. Lucene - Core
  2. LUCENE-2811

SegmentInfo should explicitly track whether that segment wrote term vectors


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
    • Lucene Fields:


      Today SegmentInfo doesn't know if it has vectors, which means its files() method must check if the files exist.

      This leads to subtle bugs, because Si.files() caches the files but then we fail to invalidate that later when the term vectors files are created.

      It also leads to sloppy code, eg TermVectorsReader "gracefully" handles being opened when the files do not exist. I don't like that; it should only be opened if they exist.

      This also fixes these intermittent failures we've been seeing:

      junit.framework.AssertionFailedError: IndexFileDeleter doesn't know about file _1e.tvx
             at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(
             at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(
             at org.apache.lucene.index.IndexWriter.filesExist(
             at org.apache.lucene.index.IndexWriter.startCommit(
             at org.apache.lucene.index.IndexWriter.prepareCommit(
             at org.apache.lucene.index.IndexWriter.commitInternal(
             at org.apache.lucene.index.IndexWriter.commit(
             at org.apache.lucene.index.IndexWriter.commit(
             at org.apache.lucene.index.TestIndexWriterExceptions.testRandomExceptionsThreads(
      1. LUCENE-2811.patch
        30 kB
        Michael McCandless


        Grant Ingersoll made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12564206 ] jira [ 12585633 ]
        Mark Thomas made changes -
        Workflow jira [ 12539970 ] Default workflow, editable Closed status [ 12564206 ]
        Michael McCandless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Michael McCandless made changes -
        Field Original Value New Value
        Attachment LUCENE-2811.patch [ 12466131 ]
        Michael McCandless created issue -


          • Assignee:
            Michael McCandless
            Michael McCandless
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: