[SERVER-20117] Allow queries with a sort routed through mongos to be covered in the new mongos read path Created: 25/Aug/15  Updated: 15/Oct/15  Resolved: 12/Oct/15

Status: Closed
Project: Core Server
Component/s: Querying, Sharding
Affects Version/s: None
Fix Version/s: 3.2.0-rc0

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: YunHe Wang
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QuInt A (10/12/15), QuInt B (11/02/15)
Participants:

 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.



 Comments   
Comment by Githook User [ 12/Oct/15 ]

Author:

{u'username': u'yhjw88', u'name': u'Yunhe (John) Wang', u'email': u'yunhe.wang@mongodb.com'}

Message: SERVER-20117 Allow queries with meta sortkey to be covered in mongos
Branch: master
https://github.com/mongodb/mongo/commit/28a2d6fa3f7fb6659f578d69e6d772ae9be8c25e

Generated at Thu Feb 08 03:53:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.