[SERVER-49290] Support running $lookup locally on shard for config.cache.chunks.* namespaces Created: 02/Jul/20  Updated: 29/Oct/23  Resolved: 10/Aug/20

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.7.0

Type: New Feature Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Haley Connelly
Resolution: Fixed Votes: 0
Labels: PM-234-M2, PM-234-T-data-clone, query-work-resharding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done before SERVER-49785 Write and test aggregation pipeline f... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-07-27, Sharding 2020-08-10, Sharding 2020-08-24
Participants:

 Description   

The config.cache.chunks.* collections are created as part of a shard refreshing the metadata (routing table) for a sharded collection. A complete copy of the config.cache.chunks.* collections exist on each shard (they are so-called reference tables). It is therefore always valid for a shard to read from a config.cache.chunks.* namespace locally. (The existing $lookup behavior is to do the merging on the primary shard for the database.)

The from parameter to the $lookup stage should be made to support the following syntax:

{from: {db: <string>, coll: <string>}}

It must be an error to use this new syntax with any namespace other than config.cache.chunks.*

Additionally, the $lookup stage must not attempt to route the request for config.cache.chunks.* to any other shard, even when the internalQueryAllowShardedLookup server parameter is enabled. Consider generalizing the check for the local database in the attachCursorToPipeline() function to be NamespaceString::isNamespaceAlwaysUnsharded().



 Comments   
Comment by Githook User [ 07/Aug/20 ]

Author:

{'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}

Message: SERVER-49290 Support running $lookup locally on shard for config.cache.chunks.* namespaces
Branch: master
https://github.com/mongodb/mongo/commit/426ed301b2e61107e82822764a855feb27168742

Generated at Thu Feb 08 05:19:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.