-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.1.2
-
Component/s: Internal Code, Sharding
-
None
-
Fully Compatible
-
ALL
-
Sharding 8 08/28/15
On mongod the dateSize command takes as its first argument the fully qualified namespace. To do this it overrides the parseNs method to use parseNsFullyQualified: https://github.com/mongodb/mongo/blob/master/src/mongo/db/dbcommands.cpp#L680.
Mongos does not do that, so it expects its first argument to be just the collection name part, not including the database name as the mongod side expects.
This makes this command effectively broken and unusable through mongos:
> use test switched to db test > db.runCommand({dataSize:'test.foo'}) { "code": 13408, "ok": 0, "errmsg": "exception: keyPattern must equal shard key" } > db.runCommand({dataSize:'foo'}) { "errmsg": "exception: need a non-empty collection name", "code": 28538, "ok": 0, "$gleStats": { "lastOpTime": Timestamp(0, 0), "electionId": ObjectId("55b904a69035d5fa8adaf55e") } }
- is related to
-
SERVER-20029 Add test coverage for dataSize command
- Closed