lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] Commented: (LUCENE-2618) Intermittent failure in 3.x's backwards TestThreadedOptimize
Date Fri, 22 Oct 2010 05:40:17 GMT


Shai Erera commented on LUCENE-2618:

Ok - I agree maybeMerge is probably less frequently called than optimize. And perhaps we can
look at it that way: when you call optimize, you know exactly what to expect. You control
the # of final segments. When you call maybeMerge lucene does not guarantee the final result.
Unless you know exactly the state of all the segments in the index (which except than from
unit tests I think it's very unlikely) and exactly what your MP is doing, you cannot expect
any guaranteed outcome from calling maybeMerge, except for it "doing the best effort".

What bothered me is that even if maybeMerge and optimize may go through several levels of
merging following one call to them, one is guaranteed to complete and the other isn't. But
since optimize is more common in apps than the other, I'm willing to make that exception.
Perhaps then add to maybeMerge docs that if you want to guarantee merges finish when close
is called, you should wait for merges? Or should we add it to close?

I'm fine now with this fix. +1 to commit.

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