Operational Defect Database

BugZero found this defect 39 days ago.

MongoDB | 2637208

Running aggregations through the embedded router from a cluster without shards must succeed with an empty result

Last update date:

4/10/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

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.

Top User Comments


Steps to Reproduce

const st = new ShardingTest({shards: 0, embeddedRouter: true}); assert.commandWorked( st.s.getDB('admin').currentOp({type: 'op', desc: 'ReshardCollectionCoordinator'})); st.stop();

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

In Code Review

Learn More

Search:

...