Lucene - Core
  1. Lucene - Core
  2. LUCENE-5090

SSDVA should detect a mismatch in the SSDVReaderState

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4, Trunk
    • 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 added a comment -

        Bulk close resolved 4.4 issues

        Show
        Steve Rowe added a comment - Bulk close resolved 4.4 issues
        Hide
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        Robert Muir added a comment -

        +1

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

        ReaderUtil.getTopLevelContext ?

        Perfect!

        New patch w/ that ...

        Show
        Michael McCandless added a comment - ReaderUtil.getTopLevelContext ? Perfect! New patch w/ that ...
        Hide
        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
        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
        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
        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:
            Michael McCandless
            Reporter:
            Michael McCandless
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development