Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

StressTest: Document not guaranteed to be found after write and commit

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


sanne.grinovero at gmail

Nov 25, 2009, 9:30 AM

Post #1 of 3 (308 views)
Permalink
StressTest: Document not guaranteed to be found after write and commit

Hello,
I developed a stress test to assert that a new document containing a
specific term "X" is always found after a commit on the IndexWriter.
This works most of the time, but it fails under load in rare occasions.

I'm testing with 40 Threads, both with a SerialMergeScheduler and a
ConcurrentMergeScheduler, all sharing a common IndexWriter.
Attached testcase is using a RAMDirectory only, but I verified a
FSDirectory behaves in the same way so I don't believe it's the
Directory implementation or the MergeScheduler.
This test is slow, so I don't consider it a functional or unit test.
It might give false positives: it doesn't always fail, sorry I
couldn't find out how to make it more likely to happen, besides
scheduling it to run for a longer time.

Could someone please try it, and suggest if my test is wrong or if I
should open a new issue?
The patch applies to 2.9.1, I've experienced same behavior on 2.4.1.

Best regards,
Sanne Grinovero

P.S. congratulations with the release of 3.0.0 :-)
Attachments: lucene-stresstest.patch (12.6 KB)


lucene at mikemccandless

Nov 25, 2009, 11:05 AM

Post #2 of 3 (293 views)
Permalink
Re: StressTest: Document not guaranteed to be found after write and commit [In reply to]

Indeed I see this test failing too! On first look the test seems correct.

Can you open an issue & attach this as a patch? Thanks.

Mike

On Wed, Nov 25, 2009 at 12:30 PM, Sanne Grinovero
<sanne.grinovero [at] gmail> wrote:
> Hello,
> I developed a stress test to assert that a new document containing a
> specific term "X" is always found after a commit on the IndexWriter.
> This works most of the time, but it fails under load in rare occasions.
>
> I'm testing with 40 Threads, both with a SerialMergeScheduler and a
> ConcurrentMergeScheduler, all sharing a common IndexWriter.
> Attached testcase is using a RAMDirectory only, but I verified a
> FSDirectory behaves in the same way so I don't believe it's the
> Directory implementation or the MergeScheduler.
> This test is slow, so I don't consider it a functional or unit test.
> It might give false positives: it doesn't always fail, sorry I
> couldn't find out how to make it more likely to happen, besides
> scheduling it to run for a longer time.
>
> Could someone please try it, and suggest if my test is wrong or if I
> should open a new issue?
> The patch applies to 2.9.1, I've experienced same behavior on 2.4.1.
>
> Best regards,
> Sanne Grinovero
>
> P.S. congratulations with the release of 3.0.0 :-)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
> For additional commands, e-mail: java-dev-help [at] lucene
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene


sanne.grinovero at gmail

Nov 25, 2009, 1:28 PM

Post #3 of 3 (287 views)
Permalink
Re: StressTest: Document not guaranteed to be found after write and commit [In reply to]

thanks a lot for looking into it.
It's opened: https://issues.apache.org/jira/browse/LUCENE-2095

Besides this being expected behavior after a commit(), I'm needing
this to be able to assert state consistency on the distributed
Directory under load: any suggestions for a temporary workaround?

I am thinking about a statistical assert, like considering it's fine
if (ratio error < some threshold), but that's my last resort.

Regards,
Sanne


2009/11/25 Michael McCandless <lucene [at] mikemccandless>:
> Indeed I see this test failing too!  On first look the test seems correct.
>
> Can you open an issue & attach this as a patch?  Thanks.
>
> Mike
>
> On Wed, Nov 25, 2009 at 12:30 PM, Sanne Grinovero
> <sanne.grinovero [at] gmail> wrote:
>> Hello,
>> I developed a stress test to assert that a new document containing a
>> specific term "X" is always found after a commit on the IndexWriter.
>> This works most of the time, but it fails under load in rare occasions.
>>
>> I'm testing with 40 Threads, both with a SerialMergeScheduler and a
>> ConcurrentMergeScheduler, all sharing a common IndexWriter.
>> Attached testcase is using a RAMDirectory only, but I verified a
>> FSDirectory behaves in the same way so I don't believe it's the
>> Directory implementation or the MergeScheduler.
>> This test is slow, so I don't consider it a functional or unit test.
>> It might give false positives: it doesn't always fail, sorry I
>> couldn't find out how to make it more likely to happen, besides
>> scheduling it to run for a longer time.
>>
>> Could someone please try it, and suggest if my test is wrong or if I
>> should open a new issue?
>> The patch applies to 2.9.1, I've experienced same behavior on 2.4.1.
>>
>> Best regards,
>> Sanne Grinovero
>>
>> P.S. congratulations with the release of 3.0.0 :-)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
>> For additional commands, e-mail: java-dev-help [at] lucene
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
> For additional commands, e-mail: java-dev-help [at] lucene
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.