Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-33005

Contained $or access planning is incorrect for $elemMatch object, results in invariant failure

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Fixed
    • 3.6.0, 3.7.1
    • 3.6.3, 3.7.2
    • Querying
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • Hide

      Run the attached repro.js:

      python buildscripts/resmoke.py repro.js
      

      Show
      Run the attached repro.js : python buildscripts/resmoke.py repro.js
    • Query 2018-02-12

    Description

      The server crashes when a query is eligible for an OR pushdown through an $elemMatch object with an $or descendent. This issue only affects query shapes that involve an $elemMatch-$or construction, such as the following:

      coll.find({a: 1, $or: [{b: 2}, {b: {$elemMatch: {$or: [{c: 4}, {c: 5}]}}}]});
      

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: