|
The attachCursorToPipeline() helper in sharded_agg_helpers.cpp will skip the unsharded collection targeting path if the collection is "config.collections" and will merge a lookup pipeline targeting that collection on "any" shard instead of the primary shard. This was added in SERVER-67891 likely because the $lookup used by $shardedDataDistribution reads from a config server collection, but wants to join with data from other collections, which the config server didn't have logic to support because it uses the NonShardServerProcessInterface for aggregations. PM-2290 makes config servers use the regular shard server process interface, so this logic should be unnecessary and can be removed if the cluster is in a high enough FCV (to guarantee the config server is in the latest binary).
|