[ https://issues.apache.org/jira/browse/LUCENE-4245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420613#comment-13420613 ]
Uwe Schindler commented on LUCENE-4245: --------------------------------------- What is the problem with the attached patch? bq. Why is that different from OutputStream.close() calling flush()? Would you like to call flush() yourself everytime before you close()? I agree with Shai, I dont see any reason to change this logic. If we remove the wait for merge/commit shit in IW.close(), we still have to wait for the MergeScheduler to shutdown. As this one is in another thread, you have to join()/wait() so its always interruptible. Thats the main problem with CMS, shutting it down is hard. My attached patch does three steps to shutdown, if we remove the commit, it would just be one step less, but the very last step mergeScheduler.close() [see patch] would stay alive, and this one unfortunately can be interrupted (if it is CMS). Can we do 2 steps? First commit something like my patch and later think about committing/flushing/... or not? > 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