Lucene - Core
  1. Lucene - Core
  2. LUCENE-3255

Corrupted segment file not detected and wipes index contents

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.4, 3.2
    • Fix Version/s: 3.4
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Lucene will happily wipe an existing index if presented with a latest generation segments_n file of all zeros. File format documentation says segments_N files should start with a format of -9 but SegmentInfos.read accepts >=0 as valid for backward compatibility reasons.

      1. LUCENE-3255.patch
        5 kB
        Michael McCandless
      2. LUCENE-3255_testcase.patch
        3 kB
        Simon Willnauer
      3. CorruptionCheckerForPreLucene3.java
        0.9 kB
        Mark Harwood
      4. BadSegmentsFileTest.java
        3 kB
        Mark Harwood
      5. AllZerosSegmentFile
        0.0 kB
        Mark Harwood

        Activity

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Mark Harwood
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development