[ https://issues.apache.org/jira/browse/LUCENE-4245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420644#comment-13420644 ]
Uwe Schindler commented on LUCENE-4245: --------------------------------------- bq. If that means waiting for all merge threads to finish even though you have been interrupted - that is fine. It's up to the app how to respond to an interrupt. I'd prefer merges where aborted - usually if you are going to listen to an interrupt at all, you try to do it in a timely manner. That's what the patch is doing. If you interrupt close(), it will recover the wait() and try a second time on the mergeScheduler with longer wait for merges to finish. That's all it does. But as waiting in the mergeScheduler.close() call contains Thread.join() [for CMS] its also interruptible, so this call must be repeated until no exceptions occur anymore. It is the same like closeSafely, it also tries to close everything ignoring Exceptions. > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org