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

Validate checksum footers for postings lists, docvalues, storedfields, termvectors on init

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      For small files (e.g. where we read in all the bytes anyway), we currently validate the checksum on reader init.

      But for larger files like .doc/.frq/.pos/.dvd/.fdt/.tvd we currently do nothing at all on init, as it would be too expensive.

      We should at least do this:

      // NOTE: data file is too costly to verify checksum against all the bytes on 
      // open, but for now we at least verify proper structure of the checksum 
      // footer: which looks for FOOTER_MAGIC + algorithmID. This is cheap 
      // and can detect some forms of corruption such as file truncation.
      CodecUtil.retrieveChecksum(data);
      

        Attachments

        1. LUCENE-5842.patch
          15 kB
          Robert Muir
        2. LUCENE-5842.patch
          14 kB
          Robert Muir

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rcmuir Robert Muir
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: