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

Corrupted segment file not detected and wipes index contents

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9.4, 3.2
    • 3.4
    • None
    • None
    • 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

            mikemccand Michael McCandless
            mharwood Mark Harwood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: