-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: 3.6.18
-
Component/s: None
-
None
-
Query Optimization
-
ALL
This affects 3.6 and potentially earlier servers.
Database exists, collection does not:
MongoDB Enterprise mongos> db.runCommand({collStats:'foo'}) { "sharded" : false, "primary" : "shard01", "ns" : "mongoid_test.foo", "ok" : 0, "errmsg" : "Collection [mongoid_test.foo] not found.", "operationTime" : Timestamp(1596397090, 1), "$clusterTime" : { "clusterTime" : Timestamp(1596397090, 1), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } } }
Neither database nor collection exist:
MongoDB Enterprise mongos> db.runCommand({collStats:'foo'}) { "ok" : 0, "errmsg" : "database bar not found", "code" : 26, "codeName" : "NamespaceNotFound", "operationTime" : Timestamp(1596397102, 1), "$clusterTime" : { "clusterTime" : Timestamp(1596397102, 1), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } } }
Note that the second command had an error code (26) and the first command did not have an error code.
4.0 uses error code 8 here as far as I can tell.
- is related to
-
SERVER-51206 collStats command does not return an error when the collection does not exist on sharded clusters
- Closed
- related to
-
MONGOID-4915 Add more test configurations, fix sharding tasks on pre-4.2 servers
- Closed