lucene-dev mailing list archives

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

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

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: https://issues.apache.org/jira/browse/LUCENE-2618
>             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):
FAILED
>     [junit] null
>     [junit] junit.framework.AssertionFailedError: null
>     [junit] 	at org.apache.lucene.index.TestThreadedOptimize.runTest(TestThreadedOptimize.java:125)
>     [junit] 	at org.apache.lucene.index.TestThreadedOptimize.testThreadedOptimize(TestThreadedOptimize.java:149)
>     [junit] 	at org.apache.lucene.util.LuceneTestCase.runBare(LuceneTestCase.java:253)
> {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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message