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] Resolved: (LUCENE-952) GData's TestGdataIndexer.testDestroy() intermittently hits spin loop & causes build timeout
Date Sat, 07 Jul 2007 12:30:04 GMT

     [ 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


Mime
View raw message