You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2015/02/04 19:35:35 UTC

[jira] [Updated] (LUCENE-6217) IndexWriter should make it clear when tragedy strikes

     [ https://issues.apache.org/jira/browse/LUCENE-6217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-6217:
---------------------------------------
    Attachment: LUCENE-6217.patch

Simple patch, adding getTragicException and isOpen to IW, and I fixed a couple tests to use these methods.

> IndexWriter should make it clear when tragedy strikes
> -----------------------------------------------------
>
>                 Key: LUCENE-6217
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6217
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>         Attachments: LUCENE-6217.patch
>
>
> If you hit an exception at a "bad time" e.g. when writing files for a newly flushed segment, IndexWriter declares it a tragedy and secretly closes itself as a side effect of the exception.
> Subsequent operations will throw an ACE with the exception that caused the tragedy as its cause.
> This requires messy code, if you want to know when this happened to you, since the first exception doesn't make it clear that it was "tragic".
> I think we should make it easier to know when this happens?
> Maybe we could instead throw a new exception (IWClosedByTragedy or something), or maybe we add a getter (.getTragicException) to IW?



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

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