You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Rei Shapira (JIRA)" <ji...@apache.org> on 2017/05/22 18:02:04 UTC

[jira] [Created] (LUCENE-7843) DirectoryReader.listCommits handling of corrupt segments has broken

Rei Shapira created LUCENE-7843:
-----------------------------------

             Summary: DirectoryReader.listCommits handling of corrupt segments has broken
                 Key: LUCENE-7843
                 URL: https://issues.apache.org/jira/browse/LUCENE-7843
             Project: Lucene - Core
          Issue Type: Bug
          Components: core/index
    Affects Versions: 6.5.1
         Environment: Windows, MMapDirectory
            Reporter: Rei Shapira


DirectoryReader.listCommits expects FileNotFoundException and NoSuchFileException while trying to read a specific commit file - if these are thrown then 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 CorruptIndexException.

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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org