[ 
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

Much more easier patch:

- In preparation for Roberts work on LUCENE-4246, I made MergeScheduler and its 
close() implement Closeable, so we can later also close the scheduler using 
IOUtils.
- MergeScheduler, especially CMS's close() are not interruptible (which makes 
no sense). Close waits until all threads are dead. The fix was easy, just 
ignore InterruptedException in close() and loop.
- The IndexWriter changes can be removed later once Robert finishes. Waiting 
for pending merges and all that stuff is done in this patch, but easy 
removeable. It just makes those call uninteruptible, too by falling back to be 
as quick as possible when interrupted. The MergeScheduler.close() call at end 
should be moved to a final finally block using IOUtils (later in LUCENE-4246).

I think this is ready to commit. I will think about a good test.
                
> 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, 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