Solr
  1. Solr
  2. SOLR-6029

CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.7.1
    • Fix Version/s: 4.8.1, 4.9
    • Component/s: query parsers
    • Labels:
      None

      Description

      CollapsingQParserPlugin misidentifies if a document is not found in a segment if the docid previously existed in a segment ie.... was deleted.

      Relevant code bit from CollapsingQParserPlugin needs to be changed from:
      -if(doc != -1) {
      +if((doc != -1) && (doc != DocsEnum.NO_MORE_DOCS)) {

      What happens is if the doc is not found the returned value is DocsEnum.NO_MORE_DOCS. This would then get set in the fq bitSet array as the doc location causing an ArrayIndexOutOfBoundsException as the array is only as big as maxDocs.

        Activity

        Hide
        Greg Harris added a comment -

        Patch with test for 4.7

        Show
        Greg Harris added a comment - Patch with test for 4.7
        Hide
        Joel Bernstein added a comment -

        Thanks Greg, this is a nasty bug.

        Show
        Joel Bernstein added a comment - Thanks Greg, this is a nasty bug.
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6029: CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment

        Show
        ASF subversion and git services added a comment - Commit 1590865 from Joel Bernstein in branch 'dev/trunk' [ https://svn.apache.org/r1590865 ] SOLR-6029 : CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6029: CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment

        Show
        ASF subversion and git services added a comment - Commit 1590866 from Joel Bernstein in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1590866 ] SOLR-6029 : CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6029: Updated CHANGES.txt

        Show
        ASF subversion and git services added a comment - Commit 1590867 from Joel Bernstein in branch 'dev/trunk' [ https://svn.apache.org/r1590867 ] SOLR-6029 : Updated CHANGES.txt
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6029: Updated CHANGES.txt

        Show
        ASF subversion and git services added a comment - Commit 1590868 from Joel Bernstein in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1590868 ] SOLR-6029 : Updated CHANGES.txt
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6029: Updated CHANGES.txt

        Show
        ASF subversion and git services added a comment - Commit 1590965 from Joel Bernstein in branch 'dev/trunk' [ https://svn.apache.org/r1590965 ] SOLR-6029 : Updated CHANGES.txt
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-6029: Updated CHANGES.txt

        Show
        ASF subversion and git services added a comment - Commit 1590966 from Joel Bernstein in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1590966 ] SOLR-6029 : Updated CHANGES.txt
        Hide
        ASF subversion and git services added a comment -

        Commit 1592821 from hossman@apache.org in branch 'dev/branches/lucene_solr_4_8'
        [ https://svn.apache.org/r1592821 ]

        Merge back several "low hanging" bug fixes into the 4.8 branch...
        SOLR-6029: r1590867
        SOLR-6030: r1591555
        SOLR-6037: r1591800
        SOLR-6023: r1592195
        SOLR-5090: r1592591
        SOLR-6039: r1592605
        SOLR-5993: r1588415
        SOLR-5904: r1587702

        Show
        ASF subversion and git services added a comment - Commit 1592821 from hossman@apache.org in branch 'dev/branches/lucene_solr_4_8' [ https://svn.apache.org/r1592821 ] Merge back several "low hanging" bug fixes into the 4.8 branch... SOLR-6029 : r1590867 SOLR-6030 : r1591555 SOLR-6037 : r1591800 SOLR-6023 : r1592195 SOLR-5090 : r1592591 SOLR-6039 : r1592605 SOLR-5993 : r1588415 SOLR-5904 : r1587702
        Hide
        ASF subversion and git services added a comment -

        Commit 1592880 from Joel Bernstein in branch 'dev/branches/lucene_solr_4_8'
        [ https://svn.apache.org/r1592880 ]

        SOLR-6029: CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment

        Show
        ASF subversion and git services added a comment - Commit 1592880 from Joel Bernstein in branch 'dev/branches/lucene_solr_4_8' [ https://svn.apache.org/r1592880 ] SOLR-6029 : CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment
        Hide
        ASF subversion and git services added a comment -

        Commit 1598195 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1598195 ]

        SOLR-6029: fix smoke test failure

        Show
        ASF subversion and git services added a comment - Commit 1598195 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1598195 ] SOLR-6029 : fix smoke test failure
        Hide
        ASF subversion and git services added a comment -

        Commit 1598196 from Michael McCandless in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1598196 ]

        SOLR-6029: fix smoke test failure

        Show
        ASF subversion and git services added a comment - Commit 1598196 from Michael McCandless in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1598196 ] SOLR-6029 : fix smoke test failure

          People

          • Assignee:
            Joel Bernstein
            Reporter:
            Greg Harris
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development