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

Uwe Schindler updated LUCENE-4245:
----------------------------------

    Attachment: LUCENE-4245.patch

Unfortunately more methods in CMS can throw ThreadInterruptedException, so 
handle all cases and try hardest to clean up all running merge threads on close.

This example shows why it is better to let InterruptedException be handled as 
checked Exception. With the original InterruptedException declared everywhere 
and not converted to a RuntimeException, the need for cleanup in close() [which 
is not allowed to throw InterrupotedException because Closeable interface] is 
obvious and we are enforced to do it.

We should rethink about InterruptedException!
                
> IndexWriter#close(true) should either not be interruptible or should abort 
> background merge threads before returning
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4245
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4245
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>            Reporter: Mark Miller
>            Assignee: Uwe Schindler
>            Priority: Minor
>         Attachments: LUCENE-4245.patch, LUCENE-4245.patch
>
>
> Currently, there is no safe way to close a directory after closing the writer 
> without causing an exception in a merge thread if the #close call is 
> interrupted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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