-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Fully Compatible
-
Sharding 2020-07-27, Sharding 2020-08-10, Sharding 2020-08-24
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().
- has to be done before
-
SERVER-49785 Write and test aggregation pipeline for collection bulk loader for resharding
- Closed