-
Type: Task
-
Resolution: Won't Do
-
Priority: Critical - P2
-
Affects Version/s: None
-
Labels:
-
0.1
Description
When a sort is requested for a query in a sharded cluster, the mongos will add a "$sortKey: {$meta: 'sortKey'}" entry to the projection that gets passed to the sharded mongod processes. Testing on 4.1.4 indicates that this is true for SINGLE_SHARD plans as well. This impacts how index filters get applied and should be taken into consideration when configuring them.
This should be added to the planCacheSetFilter page. We can also consider adding it to the mongos "sharded cluster query router" page since there's a sorting section, although it currently only mentions the behavior when no sort is requested.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
- is duplicated by
-
DOCS-4428 Queries executed via MongoS will always project the sort key
- Closed