lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4245) IndexWriter#close(true) should either not be interruptible or should abort background merge threads before returning
Date Tue, 24 Jul 2012 10:30:34 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-4245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421313#comment-13421313
] 

Michael McCandless commented on LUCENE-4245:
--------------------------------------------

It still makes me nervous having suprising side effects (killing
merges) from Thread.interrupt().  It reminds me how NIOFSDir and
MMapDir close the file if they are interrupted during IO.

But I guess we already have an unavoidable surprising side effect (if
interrupt arrives during flush then that whole segment is discarded),
and I guess it makes sense to kill all merges on interrupt since the
intention is most likely to abort any unecessary things for close.

So I'm OK with what was committed.  Separately the cleanups are great!
Thanks Uwe.

                
> 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
>             Fix For: 4.0, 5.0
>
>         Attachments: LUCENE-4245.patch, LUCENE-4245.patch, 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message