[jira] Created: (LUCENE-2532) improve test coverage of multi-segment indices

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
improve test coverage of multi-segment indices
----------------------------------------------

                 Key: LUCENE-2532
                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Michael McCandless
            Assignee: Michael McCandless
            Priority: Minor
             Fix For: 3.1, 4.0
         Attachments: LUCENE-2532.patch

Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-2532:
---------------------------------------

    Attachment: LUCENE-2532.patch

Attached patch.  I only cutover TestRegexpRandom2 for starters...

> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Robert Muir commented on LUCENE-2532:
-------------------------------------

thanks, I'll apply this logic to a few other multitermquery tests i am familiar with, and upload a new patch.

> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2532:
--------------------------------

    Attachment: LUCENE-2532.patch

ok, hopefully this is just my screwup, but just in case: i want to get uwe or someone to confirm :)

I started converting some test cases to use this, and got some failures in TestNumericRangeQuery64:
{noformat}
    [junit] Testsuite: org.apache.lucene.search.TestNumericRangeQuery64
    [junit] Testcase: testRange_8bit(org.apache.lucene.search.TestNumericRangeQuery64): FAILED
    [junit] Distinct term number is equal for all query types expected:<494> but was:<493>
    [junit] junit.framework.AssertionFailedError: Distinct term number is equal for all query types expected:<494> but was:<493>
    [junit]     at org.apache.lucene.search.TestNumericRangeQuery64.testRange(TestNumericRangeQuery64.java:159)
    [junit]     at org.apache.lucene.search.TestNumericRangeQuery64.testRange_8bit(TestNumericRangeQuery64.java:167)
...
[junit] ------------- Standard Output ---------------
[junit] NOTE: random static seed of testclass 'testRange_8bit' was: 7879034790334081579
{noformat}

to reproduce, just plug in the seed to the beforeClass method:
{code}
Random random = newStaticRandom(TestNumericRangeQuery64.class, 7879034790334081579L);
{code}


> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Robert Muir commented on LUCENE-2532:
-------------------------------------

OK, this was just my stupidity... the assertion here (MTQ's getTermCount) isnt valid for a multi-segment + constant score rewrite case, so i conditionalized the assert.


> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2532:
--------------------------------

    Attachment: LUCENE-2532.patch

here is the current progress, i only converted a few more tests over, but added more randomness to randomIW (random codec, compound file, tii, etc)

this caused a test fail in numericrange64... unfortunately it was an exception in another thread and we arent printing the random seed in this case... i need to fix this.

ill upload the stacktrace separately

> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, stacktrace.txt
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2532:
--------------------------------

    Attachment: stacktrace.txt

stacktrace file

> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, stacktrace.txt
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2532:
--------------------------------

    Attachment: LUCENE-2532.patch

here is an updated patch, with a lot more tests converted over.
the previous problem was just a bad assertion (thanks Mike)

But this one has a new problem, i angered spans.TestBasics somehow (use seed 7669636241779895237L)
will try to debug it later, feel free if you have ideas.


> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, stacktrace.txt
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2532:
--------------------------------

    Attachment: LUCENE-2532.patch

here's the final patch... I got a good chunk of o.a.l.search tests converted over.

I think I am sick of this now, we can convert more later.

I plan to commit soon... and try to merge to 3x


> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, stacktrace.txt
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Michael McCandless commented on LUCENE-2532:
--------------------------------------------

Looks great Robert!  +1 to commit

> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, stacktrace.txt
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir reassigned LUCENE-2532:
-----------------------------------

    Assignee: Robert Muir  (was: Michael McCandless)

> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Robert Muir
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, stacktrace.txt
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Robert Muir commented on LUCENE-2532:
-------------------------------------

Committed revision 963720 to trunk. I'll work on the merge to 3x, sure it will be completely smooth :)

> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Robert Muir
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, stacktrace.txt
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (LUCENE-2532) improve test coverage of multi-segment indices

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir resolved LUCENE-2532.
---------------------------------

    Resolution: Fixed

Committed revision 963780 to 3x

> improve test coverage of multi-segment indices
> ----------------------------------------------
>
>                 Key: LUCENE-2532
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2532
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Robert Muir
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, LUCENE-2532.patch, stacktrace.txt
>
>
> Simple patch that adds a test-only helper class, RandomIndexWriter, that lets you add docs, but it will randomly do things like use a different merge policy/scheduler, flush by doc count instead of RAM, flush randomly (so we get multi-segment indices) but also randomly optimize in the end (so we also sometimes test single segment indices).

--
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: [hidden email]
For additional commands, e-mail: [hidden email]