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

Query planner does not filter 2dsphere Index Version 3 correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.2.3, 3.3.2
    • Component/s: Geo, Querying
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      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
    • Sprint:
      Query 10 (02/22/16)

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: