-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
ALL
-
-
CAR Team 2024-04-15
-
160
When using a MongoS, and running an aggregation in a sharded cluster with no shards, we are going to return an empty result and a successful status. The flow is the following:
- Run cluster aggregate (link)
- Check for the routing information (link)
- As there are no shards in the cluster, return ShardNotFound (link)
- Return empty result and OK (link)
On the other hand, when using an embedded router placed in a csrs we are not following the same path, when we should, resulting in an expected behaviour (see BF-32481). The flow is the following:
- Run cluster aggregate (link)
- Check for the routing information (link)
- There are no shards in the cluster but this node has ConfigServer as serverGlobalParams (shared because the router is embedded in the configsvr node), so it will skip returning ShardNotFound when it should throw (link)
The goal of this ticket is to refactor this condition to make it compatible with the embedded router placed in a config server node.