[ https://issues.apache.org/jira/browse/LUCENE-4245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420633#comment-13420633 ]
Mark Miller commented on LUCENE-4245: ------------------------------------- bq. What is the problem with the attached patch? Nothing in my opinion - +1 from me. I think Robert's issue is another JIRA that will have it's own discussion. But I guess Mike is not on board with the current patch? I guess I don't see it as magic. An interrupt in java means please stop what you are doing. It's up to the app to determine what to stop and what not to stop and how long to take. I don't think that's interpreting an interrupt - it just is what it is. It's loose as goose. When I say that close should not be interruptible, I don't mean that interrupts should not kill IO - I mean that the IW should still close and not leave threads running. I mean that once you call IW#close that should be the end game. It should then be safe to call Dir#close. 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. > 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