Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-5090

SSDVA should detect a mismatch in the SSDVReaderState

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4, 6.0
    • Component/s: modules/facet
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This is trappy today: every time you open a new reader, you must create a new SSDVReaderState (this computes the seg -> global ord mapping), and pass that to SSDVA.

      But if this gets messed up (e.g. you pass an old SSDVReaderState) it will result in confusing AIOOBE, or silently invalid results.

      1. LUCENE-5090.patch
        6 kB
        Michael McCandless
      2. LUCENE-5090.patch
        6 kB
        Michael McCandless

        Activity

        Hide
        steve_rowe Steve Rowe added a comment -

        Bulk close resolved 4.4 issues

        Show
        steve_rowe Steve Rowe added a comment - Bulk close resolved 4.4 issues
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1503425 from Michael McCandless in branch 'dev/branches/lucene_solr_4_4'
        [ https://svn.apache.org/r1503425 ]

        LUCENE-5090: fix test bug that was using mismatched readers when faceting with SortedSetDVs

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1503425 from Michael McCandless in branch 'dev/branches/lucene_solr_4_4' [ https://svn.apache.org/r1503425 ] LUCENE-5090 : fix test bug that was using mismatched readers when faceting with SortedSetDVs
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        LUCENE-5090: fix test bug that was using mismatched readers when faceting with SortedSetDVs

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1503424 from Michael McCandless in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1503424 ] LUCENE-5090 : fix test bug that was using mismatched readers when faceting with SortedSetDVs
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        LUCENE-5090: fix test bug that was using mismatched readers when faceting with SortedSetDVs

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1503423 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1503423 ] LUCENE-5090 : fix test bug that was using mismatched readers when faceting with SortedSetDVs
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1503333 from Michael McCandless in branch 'dev/branches/lucene_solr_4_4'
        [ https://svn.apache.org/r1503333 ]

        LUCENE-5090: catch mismatched readers in SortedSetDocValuesAccumulator/ReaderState

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1503333 from Michael McCandless in branch 'dev/branches/lucene_solr_4_4' [ https://svn.apache.org/r1503333 ] LUCENE-5090 : catch mismatched readers in SortedSetDocValuesAccumulator/ReaderState
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        LUCENE-5090: catch mismatched readers in SortedSetDocValuesAccumulator/ReaderState

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1503329 from Michael McCandless in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1503329 ] LUCENE-5090 : catch mismatched readers in SortedSetDocValuesAccumulator/ReaderState
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        LUCENE-5090: catch mismatched readers in SortedSetDocValuesAccumulator/ReaderState

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1503327 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1503327 ] LUCENE-5090 : catch mismatched readers in SortedSetDocValuesAccumulator/ReaderState
        Hide
        rcmuir Robert Muir added a comment -

        +1

        Show
        rcmuir Robert Muir added a comment - +1
        Hide
        mikemccand Michael McCandless added a comment -

        ReaderUtil.getTopLevelContext ?

        Perfect!

        New patch w/ that ...

        Show
        mikemccand Michael McCandless added a comment - ReaderUtil.getTopLevelContext ? Perfect! New patch w/ that ...
        Hide
        rcmuir Robert Muir added a comment -

        ReaderUtil.getTopLevelContext ?

           * Walks up the reader tree and return the given context's top level reader
           * context, or in other words the reader tree's root context.
           */
          public static IndexReaderContext getTopLevelContext(IndexReaderContext context) {
            while (context.parent != null) {
              context = context.parent;
            }
            return context;
          }
        
        Show
        rcmuir Robert Muir added a comment - ReaderUtil.getTopLevelContext ? * Walks up the reader tree and return the given context's top level reader * context, or in other words the reader tree's root context. */ public static IndexReaderContext getTopLevelContext(IndexReaderContext context) { while (context.parent != null ) { context = context.parent; } return context; }
        Hide
        mikemccand Michael McCandless added a comment -

        Initial patch w/ test case & fix ... I'm a little uncertain about the logic I did to "crawl up" to the original parent reader ... do we already have a utility method somewhere to do this?

        Show
        mikemccand Michael McCandless added a comment - Initial patch w/ test case & fix ... I'm a little uncertain about the logic I did to "crawl up" to the original parent reader ... do we already have a utility method somewhere to do this?

          People

          • Assignee:
            mikemccand Michael McCandless
            Reporter:
            mikemccand Michael McCandless
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development