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

Corrupted segment file not detected and wipes index contents

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: