|
After this change, listDatabases rejects unrecognized arguments.
The listDatabases reply from mongod and mongos were inconsistent. I'm choosing to make mongod's output more like mongos's. The listDatabases reply from mongod now includes "totalSizeMb", and the numbers returned by mongod and mongos are now all int64 (resolving the old SERVER-8323).
Here's an example mongos reply, it shows the size of the database named "db" on two shards:
{
|
"databases": [
|
{
|
"name": "db",
|
"sizeOnDisk": 81920,
|
"empty": false,
|
"shards": {
|
"test-rs0": 40960,
|
"test-rs1": 40960
|
}
|
}
|
],
|
"totalSize": 1323008,
|
"totalSizeMb": 1,
|
"ok": 1
|
}
|
Here's how types will change after this patch:
+-------------+-----------------+-----------------+
|
| | mongod | mongos |
|
+-------------------------------------------------+
|
| sizeOnDisk | double -> int64 | int64 |
|
| | | |
|
| shards | absent | int32* -> int64 |
|
| | | |
|
| totalSize | double -> int64 | int32* -> int64 |
|
| | | |
|
| totalSizeMb | absent -> int64 | int32* -> int64 |
|
| | | |
|
+-------------+-----------------+-----------------+
|
The type of each number with "*" was chosen according to its magnitude; it was usually an int32 but could be double or int64 (see BSONObjBuilder::appendNumber). Now, totalSize and totalSizeMb are always int64, as are the sizes per shard.
|