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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0-rc0
    • Component/s: Querying, Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      QuInt A (10/12/15), QuInt B (11/02/15)

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            yunhe.wang YunHe Wang
            Reporter:
            david.storch David Storch
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: