BugZero found this defect 39 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
4/10/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
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.
const st = new ShardingTest({shards: 0, embeddedRouter: true}); assert.commandWorked( st.s.getDB('admin').currentOp({type: 'op', desc: 'ReshardCollectionCoordinator'})); st.stop();