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 2007/07/07 14:30:04 UTC

[jira] Resolved: (LUCENE-952) GData's TestGdataIndexer.testDestroy() intermittently hits spin loop & causes build timeout

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

Michael McCandless resolved LUCENE-952.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3

> GData's TestGdataIndexer.testDestroy() intermittently hits spin loop & causes build timeout
> -------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-952
>                 URL: https://issues.apache.org/jira/browse/LUCENE-952
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.3
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 2.3
>
>
> Several nightly builds (at least #136, #143 and #144) have failed due
> to timeout at 45 minutes while running the TestGdataIndexer.testDestroy()
> test case.
> I tracked it down to this line:
>       // wait active for the commit
>       while(this.indexer.writer != null){}
> Intermittently, that while loop will spin forever.  I can only get the
> failure to happen on Linux: it doesn't happen on Mac OS X (haven't
> tried windows).  The nightly build runs on Solaris 10, so it also
> happens there.
> It turns out, this is due to the fact that "writer" is not declared as
> "volatile".  This is because one thread is closing the indexer, which
> sets writer to null, but another thread is running the while loop.
> If this.indexer.writer was set to null before that while loop starts,
> the test will run through fine; else, it won't.
> I plan to fix this by adding this method to GDataIndexer class:
>     // Used only for testing
>     protected synchronized IndexWriter getWriter() {
>       return this.writer;
>     }
> and changing unit test to call that method.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org