[ 
https://issues.apache.org/jira/browse/LUCENE-4870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13610107#comment-13610107
 ] 

Simon Willnauer commented on LUCENE-4870:
-----------------------------------------

mike I agree we need to fix this. I think one way of looking into this is the 
fact that we already called the doBody method in SegmentInfos.read is an 
indicator that the file exists. If that read method still throws a 
FileNotFoundException its almost certain that we need to do something here. I 
think we should never go and just return true here we should rather fire up a 
true error here like a corrupt index exception or something like this?
                
> Lucene deletes entire index if and exception is thrown due do 
> TooManyOpenFiles and OpenMode.CREATE_OR_APPEND
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4870
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4870
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.0, 4.1, 4.2, 3.6.2
>            Reporter: Simon Willnauer
>            Priority: Blocker
>             Fix For: 5.0, 4.3, 4.2.1
>
>         Attachments: LUCENE-4870.patch
>
>
> The Lucene IndexWriter might delete an entire index if it hits a 
> FileNotFoundException triggered by TooManyOpenFiles during IndexWriter 
> creation. We try to figure out if the index exists already if the 
> OpenMode.CREATE_OR_APPEND is set (which is default). Yet, the logic in 
> DirectoryReader#indexExists(Directory) will just return false if we are not 
> able to open the segment file. This will cause the IW to assume there is no 
> index and it will try to create a new index there trashing all existing 
> commit points treating this as a OpenMode.CREATE.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to