Solr
  1. Solr
  2. SOLR-6407

SortingResponseWriter String sorting broken on single segment indexes

    Details

    • Type: Test Test
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10
    • Component/s: None
    • Labels:
      None

      Description

         [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestSortingResponseWriter -Dtests.method=testSortingOutput -Dtests.seed=9096ECEE5D29523B -Dtests.slow=true -Dtests.locale=en_GB -Dtests.timezone=CTT -Dtests.file.encoding=ISO-8859-1
         [junit4] ERROR   0.14s J3  | TestSortingResponseWriter.testSortingOutput <<<
         [junit4]    > Throwable #1: java.lang.ClassCastException: org.apache.lucene.codecs.lucene410.Lucene410DocValuesProducer$6 cannot be cast to org.apache.lucene.index.MultiDocValues$MultiSortedDocValues
         [junit4]    > 	at __randomizedtesting.SeedInfo.seed([9096ECEE5D29523B:24667B8F5066589B]:0)
         [junit4]    > 	at org.apache.solr.response.SortingResponseWriter$StringValue.<init>(SortingResponseWriter.java:1091)
         [junit4]    > 	at org.apache.solr.response.SortingResponseWriter.getSortDoc(SortingResponseWriter.java:322)
         [junit4]    > 	at org.apache.solr.response.SortingResponseWriter.write(SortingResponseWriter.java:126)
         [junit4]    > 	at org.apache.solr.util.TestHarness.query(TestHarness.java:301)
         [junit4]    > 	at org.apache.solr.util.TestHarness.query(TestHarness.java:278)
         [junit4]    > 	at org.apache.solr.response.TestSortingResponseWriter.testSortingOutput(TestSortingResponseWriter.java:116)
         [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
      

        Activity

        Hide
        Mark Miller added a comment -

        Seems to reproduce. Test should exclude another codec?

        Show
        Mark Miller added a comment - Seems to reproduce. Test should exclude another codec?
        Hide
        Joel Bernstein added a comment -

        I haven't seen it fail like this ever. I'll force it to use the Lucene410 codec and try to reproduce.

        Show
        Joel Bernstein added a comment - I haven't seen it fail like this ever. I'll force it to use the Lucene410 codec and try to reproduce.
        Hide
        Mark Miller added a comment -

        It was reproducing for me with the following seed: -Dtests.seed=9096ECEE5D29523B

        Show
        Mark Miller added a comment - It was reproducing for me with the following seed: -Dtests.seed=9096ECEE5D29523B
        Hide
        Joel Bernstein added a comment -

        I tried this:
        @SuppressCodecs(

        {"Lucene3x", "Lucene40","Lucene41","Lucene42","Lucene45","Lucene46","Lucene49"}

        )

        To force using Lucene410 and wasn't able to reproduce locally. I'll compare my test log to yours and see if I can see the difference.

        Show
        Joel Bernstein added a comment - I tried this: @SuppressCodecs( {"Lucene3x", "Lucene40","Lucene41","Lucene42","Lucene45","Lucene46","Lucene49"} ) To force using Lucene410 and wasn't able to reproduce locally. I'll compare my test log to yours and see if I can see the difference.
        Hide
        Hoss Man added a comment -

        modifying the test in anyway (example: adding to the list of supressed codecs) cna potentially influence the way entropy is consumed by the test framework (example: less random bits used when picking the codec) which can result in other aspects of the test not being the same (example: it might coose a diff set of index writer config options).

        have you tried the full reproduce line from the original bug description against trunk w/o any changes ot the test itself? because it fails reliably and consistently for me on trunk @ r1619947

        Show
        Hoss Man added a comment - modifying the test in anyway (example: adding to the list of supressed codecs) cna potentially influence the way entropy is consumed by the test framework (example: less random bits used when picking the codec) which can result in other aspects of the test not being the same (example: it might coose a diff set of index writer config options). have you tried the full reproduce line from the original bug description against trunk w/o any changes ot the test itself? because it fails reliably and consistently for me on trunk @ r1619947
        Hide
        Joel Bernstein added a comment -

        Not seeing anything in the test logs that jumps out at me. And it's not reproducing for me. I'll take a quick look to see if there are jenkins errors out there for this.

        Show
        Joel Bernstein added a comment - Not seeing anything in the test logs that jumps out at me. And it's not reproducing for me. I'll take a quick look to see if there are jenkins errors out there for this.
        Hide
        Joel Bernstein added a comment -

        Ok, thanks Hoss. I tried the full reproduce line and it failed. Taking a look at why.

        Show
        Joel Bernstein added a comment - Ok, thanks Hoss. I tried the full reproduce line and it failed. Taking a look at why.
        Hide
        Joel Bernstein added a comment -

        It's failing with the "Asserting(Lucene410)" codec which doesn't seem to support top level DocValues, which is used by the SortingResponseWriter to sort on top level ordinals. Looking for a way to suppress the Asserting wrapper.

        Show
        Joel Bernstein added a comment - It's failing with the "Asserting(Lucene410)" codec which doesn't seem to support top level DocValues, which is used by the SortingResponseWriter to sort on top level ordinals. Looking for a way to suppress the Asserting wrapper.
        Hide
        Joel Bernstein added a comment - - edited

        Turned out not to be a codec issue. SortingResponseWriter was throwing ClassCastException every time for single segment indexes.

        Committing a fix shortly.

        Show
        Joel Bernstein added a comment - - edited Turned out not to be a codec issue. SortingResponseWriter was throwing ClassCastException every time for single segment indexes. Committing a fix shortly.
        Hide
        ASF subversion and git services added a comment -

        Commit 1620029 from Joel Bernstein in branch 'dev/trunk'
        [ https://svn.apache.org/r1620029 ]

        SOLR-6407: SortingResponseWriter String sorting broken on single segment indexes

        Show
        ASF subversion and git services added a comment - Commit 1620029 from Joel Bernstein in branch 'dev/trunk' [ https://svn.apache.org/r1620029 ] SOLR-6407 : SortingResponseWriter String sorting broken on single segment indexes
        Hide
        ASF subversion and git services added a comment -

        Commit 1620031 from Joel Bernstein in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1620031 ]

        SOLR-6407: SortingResponseWriter String sorting broken on single segment indexes

        Show
        ASF subversion and git services added a comment - Commit 1620031 from Joel Bernstein in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1620031 ] SOLR-6407 : SortingResponseWriter String sorting broken on single segment indexes
        Hide
        ASF subversion and git services added a comment -

        Commit 1620032 from Joel Bernstein in branch 'dev/branches/lucene_solr_4_10'
        [ https://svn.apache.org/r1620032 ]

        SOLR-6407: SortingResponseWriter String sorting broken on single segment indexes

        Show
        ASF subversion and git services added a comment - Commit 1620032 from Joel Bernstein in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1620032 ] SOLR-6407 : SortingResponseWriter String sorting broken on single segment indexes

          People

          • Assignee:
            Joel Bernstein
            Reporter:
            Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development