-
Type: Bug
-
Resolution: Done
-
Priority: Trivial - P5
-
Affects Version/s: 2.2.0
-
Component/s: Diagnostics
-
ALL
db.stats() returns the same avgObjSize regardless of scale value passed.
The help string for db.stats() does not state the behaviour of the scale value on avgObjSize, but the documentation project states that it is affected by the scale value.
Confusingly, db.collection.stats()'s version of avgObjSize DOES scale according to the value passed. This is incorrect the help string for the function, but correct according to the documentation project.
http://docs.mongodb.org/manual/reference/database-statistics/
> db.stats(1024) { "db" : "test", "collections" : 4, "objects" : 11, "avgObjSize" : 55.27272727272727, "dataSize" : 0, "storageSize" : 16, "numExtents" : 4, "indexes" : 3, "indexSize" : 23, "fileSize" : 196608, "nsSizeMB" : 16, "ok" : 1 } > db.stats() { "db" : "test", "collections" : 4, "objects" : 11, "avgObjSize" : 55.27272727272727, "dataSize" : 608, "storageSize" : 16384, "numExtents" : 4, "indexes" : 3, "indexSize" : 24544, "fileSize" : 201326592, "nsSizeMB" : 16, "ok" : 1 }
- is related to
-
SERVER-19533 collStats through mongoS on sharded collection incorrectly scales avgObjSize
- Closed