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

Robert Muir commented on LUCENE-5958:
-------------------------------------

I think when things go wrong like this, its ideal for the user to get them asap 
(e.g. next addDocument, not commit or whatever). So I think we should close the 
writer (like closedbyinterruptexception in java when state gets messed up), so 
the next ensureOpen fails.

Instead of a hitOOM-type boolean, I think we should save any exception/error 
that causes this, and ensureOpen passes it to ACE as the cause. In the general 
case it will be null.


> OOM or exceptions during checkpoint make IndexWriter have a bad day
> -------------------------------------------------------------------
>
>                 Key: LUCENE-5958
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5958
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>
> During finishCommit(), we run checkpoint after we wrote the commit to disk, 
> but if things go wrong here (e.g. IOError when IFD deletes a pending file, 
> OOM), then everything will go wrong (we won't even properly incref things, 
> and may end out deleting wrong files if the user calls rollback, leaving a 
> corrupt index).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to