lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-2618) Intermittent failure in 3.x's backwards TestThreadedOptimize
Date Sat, 23 Oct 2010 10:00:37 GMT


Michael McCandless commented on LUCENE-2618:

bq. We should fix the code to throw the exception immediately. Is there a way to check a Directory
if it's old or not?

I agree -- should fail immediately if any of the segments are too old.

Unfortunately, I don't see a simple way to do this.  We can't just look at the version of
the segments_N file, for example, because one segment could be from 2.9, and [say] 3.1 had
last opened the index and written the 3.x file format for segments_N.  See, IW does not go
and open all SegmentReaders on open.  It's only on merge, applying deletes, or opening an
NRT reader, that we go and open segments for reading.

I think to do this correctly we should modify segments_N format to record the oldest segment
in the index?  Then IW can check this easily on open.

bq. I don't mind if you continue w/ the fix to the test as you did, but IMO it just hides
the real problem. I.e., allowing all merges caused by optimize() to finish is a correct fix.

I agree.

There is already a pre-existing TODO in the test stating that we should fix IW to throw this
exc on open.  I'll also add a TODO to IW's ctor and go open an issue...

> Intermittent failure in 3.x's backwards TestThreadedOptimize
> ------------------------------------------------------------
>                 Key: LUCENE-2618
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>             Fix For: 3.1, 4.0
>         Attachments: LUCENE-2618.patch, LUCENE-2618.patch
> Failure looks like this:
> {noformat}
>     [junit] Testsuite: org.apache.lucene.index.TestThreadedOptimize
>     [junit] Testcase: testThreadedOptimize(org.apache.lucene.index.TestThreadedOptimize):
>     [junit] null
>     [junit] junit.framework.AssertionFailedError: null
>     [junit] 	at org.apache.lucene.index.TestThreadedOptimize.runTest(
>     [junit] 	at org.apache.lucene.index.TestThreadedOptimize.testThreadedOptimize(
>     [junit] 	at org.apache.lucene.util.LuceneTestCase.runBare(
> {noformat}
> I just committed some verbosity so next time it strikes we'll have more details.

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:
For additional commands, e-mail:

View raw message