You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2010/12/19 15:09:00 UTC

[jira] Resolved: (LUCENE-2820) CMS fails to cleanly stop threads

     [ https://issues.apache.org/jira/browse/LUCENE-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-2820.
----------------------------------------

    Resolution: Fixed

> CMS fails to cleanly stop threads
> ---------------------------------
>
>                 Key: LUCENE-2820
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2820
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2820.patch
>
>
> When you close IW, it waits for (or aborts and then waits for) all running merges.
> However, it's wait criteria is wrong -- it waits for the threads to be done w/ their merges, not for the threads to actually die.
> CMS already has a sync() method, to wait for running threads, which we can call from CMS.close.  However it has a thread hazard because a MergeThread removes itself from mergeThreads before it actually exits.  So sync() is able to return even while a merge thread is still running.
> This was uncovered by LUCENE-2819 on the test case TestCustomScoreQuery.testCustomExternalQuery, though I expect other test cases would show it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org