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

DirectoryReader.listCommits graceful handling of corrupt commits is broken

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.5.1
    • None
    • core/index
    • None
    • Windows, MMapDirectory

    • New

    Description

      DirectoryReader.listCommits expects FileNotFoundException and NoSuchFileException while trying to read a specific commit file - if these are thrown then the code handles this gracefully and that specific commit file is not returned in the list of all commits for that directory.

      LUCENE-7662 changed the behavior of SegmentInfos.readCommit to not throw these exceptions anymore, but rather throw CorruptIndexException instead.

      This causes the code in DirectoryReader.listCommits to never encounter the previous two exception types, thus throwing the CorruptIndexException all the way to the top, instead of gracefully handling a few missing commit files.

      This breaks how Luke does a clean index operation when listing all of the commits and then proceeding to delete any files inside the index directory that were not mentioned by any of the commits.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              reis Rei Shapira
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: