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

Query planner does not filter 2dsphere Index Version 3 correctly

    • Fully Compatible
    • ALL
    • Hide
      1. Create a 2dsphere index in 3.2.1
      2. add a document without coordinates
      3. query for this document (none will be found)

      Running the same query with a 2dsphereIndexVersion will return a document but is a collection scan for 2dsphereIndexVersion 2

      Show
      Create a 2dsphere index in 3.2.1 add a document without coordinates query for this document (none will be found) Running the same query with a 2dsphereIndexVersion will return a document but is a collection scan for 2dsphereIndexVersion 2
    • Query 10 (02/22/16)

      The implementation of QueryPlannerIXSelect::stripInvalidAssignmentsTo2dsphereIndices filters version 2 2dsphere indexes (as they are sparse).

      However, version 3 of these indexes are not filtered. As a result, they can be selected as a winning plan and documents not in the index cannot be found.

      It should be noted that filtering these indexes out may result in a collection scan which will find documents but at the cost of poor performance.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            jim.oleary@mongodb.com James O'Leary
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: