Currently the config db stats are only retrieved from the config db servers if there is no config db on any shard which produces unexpected results, esp. relative to the databases mapping.
>var sh = new ShardingTest({shards:1, mongos:1, other : { separateConfig : true}}) >sh.s0.adminCommand("listDatabases") { "databases" : [ { "name" : "config", "empty" : false, "sizeOnDisk" : 50331648 } ], "totalSize" : 0, "totalSizeMb" : 0, "ok" : 1 } >sh.d0.getDB("config").stats() { "db" : "config", "collections" : 0, "objects" : 0, "avgObjSize" : 0, "dataSize" : 0, "storageSize" : 0, "numExtents" : 0, "indexes" : 0, "indexSize" : 0, "fileSize" : 0, "nsSizeMB" : 0, "ok" : 1 } > sh.s0.adminCommand("listDatabases") { "databases" : [ { "name" : "config", "sizeOnDisk" : 1, "empty" : true, "shards" : { "shard0000" : 1 } } ], "totalSize" : 1, "totalSizeMb" : 0, "ok" : 1 }
Also, the config/admin/etc dbs should be added to the totals as well.
- is duplicated by
-
SERVER-4026 size of config database on shard reported in listdatabases via mongos
- Closed