[ https://issues.apache.org/jira/browse/LUCENE-4245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420589#comment-13420589 ]
Mark Miller commented on LUCENE-4245: ------------------------------------- You don't always have control over these interrupts - ie its not 'you' that interrupts it - in my case it's jetty on shutdown. Most interrupts to Lucene are probably a result of an external agent like a web container. I don't think close should be interruptible - but waiting for merge threads to finish perhaps should be - you should still get a closed IW though. You don't know where you interrupted it and having to call close or rollback again is just confusing. It would be hard to even know if you did manage to interrupt it - the interrupt has to come from another thread - so you don't know if it happened before the close, after the close, etc. You don't know the result of the close or the interrupt or whether you have to make another call to close or rollback. In my opinion, close itself should not be an interruptible call - the interrupt should just be about canceling a wait on background merge threads at most (but they should still be stopped first) > 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