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-4275) Threaded tests with MockDirectoryWrapper delete active PostingFormat files
Date Tue, 31 Jul 2012 17:12:34 GMT

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

Michael McCandless commented on LUCENE-4275:
--------------------------------------------

OK I dug into this ... it's actually normal for a file to go missing in this test (and, in
general).

If one thread commits while another thread tries to open an IndexReader then it's expected
files could be missing as the codec tries to open its files, ie if the commit completed (and
removed old segments) before the IndexReader finished opening.  SegmentInfos.FindSegmentsFile
catches the IOException and simply retries against the new segments file.

So ... I think all we need to do is remove that fileExists check that then throws IllegalStateException
and let it throw the IOException, in BloomFilteringPF?  Or ... did something else go wrong
with that...?
                
> Threaded tests with MockDirectoryWrapper delete active PostingFormat files
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-4275
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4275
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/codecs, general/test
>    Affects Versions: 4.0-ALPHA
>         Environment: Win XP 64bit Sun JDK 1.6
>            Reporter: Mark Harwood
>             Fix For: 4.0
>
>         Attachments: Lucene-4275-TestClass.patch
>
>
> As part of testing Lucene-4069 I have encountered sporadic issues with files going missing.
I believe this is a bug in the test framework (multi-threading issues in MockDirectoryWrapper?)
so have raised a separate issue with simplified test PostingFormat class here.
> Using this test PF will fail due to a missing file roughly one in four times of executing
this test:
> ant test-core  -Dtestcase=TestIndexWriterCommit -Dtests.method=testCommitThreadSafety
-Dtests.seed=EA320250471B75AE -Dtests.slow=true -Dtests.postingsformat=TestNonCoreDummyPostingsFormat
-Dtests.locale=no -Dtests.timezone=Europe/Belfast -Dtests.file.encoding=UTF-8 

--
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