lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Harwood (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4275) Threaded tests with MockDirectoryWrapper delete active PostingFormat files
Date Wed, 01 Aug 2012 09:47:02 GMT


Mark Harwood commented on LUCENE-4275:

Nailed it, Mike. Yet another beer I owe you.
I removed the IllegalStateException and it looks like the retry logic is now kicking in and
all tests pass 

This reliance on throwing a particular exception type feels like an important contract to
document. Currently the comments in PostingsFormat.fieldsProducer() read as follows:

bq.   Reads a segment.  NOTE: by the time this call returns, it must hold open any files it
will need to use; else, those files may be deleted. 

I propose adding:

bq. Additionally, required files may be deleted during the execution of this call before there
is a chance to open them. Under these circumstances an IOException should be thrown by the
implementation. IOExceptions are expected and will automatically cause a retry of the segment
opening logic with the newly revised segments

I'll roll that documentation addition into my Lucene-4069 patch

> Threaded tests with MockDirectoryWrapper delete active PostingFormat files
> --------------------------------------------------------------------------
>                 Key: LUCENE-4275
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message