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

if index is too old you should hit an exception saying so

    XMLWordPrintableJSON

    Details

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

      Description

      If you create an index in 2.3.x (I used demo's IndexFiles) and then try to read it in 4.0.x (I used CheckIndex), you hit a confusing exception like this:

      java.io.IOException: read past EOF
              at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:154)
              at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
              at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:40)
              at org.apache.lucene.store.DataInput.readInt(DataInput.java:76)
              at org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:171)
              at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:230)
              at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:269)
              at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:649)
              at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:484)
              at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:265)
              at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:308)
              at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:287)
              at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:930)
      

      I think instead we should throw an IndexTooOldException or something like that?

        Attachments

        1. LUCENE-2523.patch
          34 kB
          Uwe Schindler
        2. LUCENE-2523.patch
          31 kB
          Uwe Schindler
        3. LUCENE-2523.patch
          36 kB
          Uwe Schindler
        4. LUCENE-2523.patch
          26 kB
          Uwe Schindler
        5. LUCENE-2523.patch
          17 kB
          Uwe Schindler
        6. LUCENE-2523.patch
          8 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              uschindler Uwe Schindler
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: