We now use CollectionRoutingInfo, provided by CollectionRouter for out shard targeting: https://github.com/mongodb/mongo/blob/5c14aa402e3cbab58d8de1e891f00e91deb023e5/src/mongo/db/pipeline/sharded_agg_helpers.cpp#L1797
But we used to call getExecutionNsRoutingInfo function instead:
The core difference is that it accounts for snapshot isolation transactions: https://github.com/mongodb/mongo/blob/5c14aa402e3cbab58d8de1e891f00e91deb023e5/src/mongo/s/cluster_commands_helpers.cpp#L791
We should add a test to check if there is a problem and fix it.
- is caused by
-
SERVER-77427 Avoid going through the network when a shard is targeting only itself for a $lookup subpipeline
- Closed