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

Allow queries with a sort routed through mongos to be covered in the new mongos read path

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc0
    • Affects Version/s: None
    • Component/s: Querying, Sharding
    • Labels:
      None
    • Fully Compatible
    • QuInt A (10/12/15), QuInt B (11/02/15)

      SERVER-19355 introduced a sortKey $meta projection which mongos will issue to mongod in order to accomplish a sort. This meta-projection instructs mongod to add the sort key it used to each document in the result set; mongos can then use this sort key to perform its sorted merge.

      Currently specifying a sortKey $meta projection will always cause the query planner to generated non-covered plans. This means that the find/getMore commands path on mongos currently cannot use index-only query execution on the shards if there is a user-specified sort. In order to support covered sort queries, we would need to allow sortKey $meta projection to work on index key data in addition to fetched data.

            Assignee:
            yunhe.wang YunHe Wang
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: