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 Sat, 23 Oct 2010 08:13:19 GMT


Shai Erera commented on LUCENE-2618:

OK Mike .I understood the sequence of operations that led to this exception before. What didn't
add up is why is it thrown during optimize, and not say up front when IW is opened, or when
the Directory was added through addIndexes.

We should fix the code to throw the exception immediately. Is there a way to check a Directory
if it's old or not? If not, such exception could really throw you off your chair, when you
hit it at a point in time not remotely related to when it was added to the index.

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. But
catching that exception upon IW.close() is a bad one IMO - people who read the code learn
how to use Lucene, and catching that exception on close() makes absolutely no sense, at least
to me. Could you plz add a TODO there to get rid of that code when we fix IW to detect old
indexes up front? That way, if someone reads the code, he'll at least understand that this
is a temporary solution.

> 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