-
Type: Bug
-
Resolution: Done
-
Priority: Trivial - P5
-
Affects Version/s: 2.6.5, 2.8.0-rc0
-
Component/s: Diagnostics, Storage
-
Fully Compatible
-
ALL
Running db.coll.stats() with mmapv1 gives following result:
db.foo.stats() { "ns" : "test.foo", "count" : 1, "size" : 48, "avgObjSize" : 48, "storageSize" : 8192, "numExtents" : 1, "nindexes" : 1, "lastExtentSize" : 8192, "paddingFactor" : 1, "systemFlags" : 1, "userFlags" : 1, "totalIndexSize" : 8176, "indexSizes" : { "_id_" : 8176 }, "ok" : 1 }
- with wiredtiger it gives:
> db.foo.stats() { "ns" : "test.foo", "count" : 1, "size" : 33, "avgObjSize" : 33, "storageSize" : 16384, "nindexes" : 1, "capped" : false, "wiredtiger" : { "uri" : "statistics:table:collection-4-3616236290870497461", "LSM" : { "bloom filters in the LSM tree" : 0, "bloom filter false positives" : 0, "bloom filter hits" : 0, "bloom filter misses" : 0, "bloom filter pages evicted from cache" : 0, "bloom filter pages read into cache" : 0, "total size of bloom filters" : 0, "sleep for LSM checkpoint throttle" : 0, "chunks in the LSM tree" : 0, "highest merge generation in the LSM tree" : 0, "queries that could have benefited from a Bloom filter that did not exist" : 0, "sleep for LSM merge throttle" : 0 }, "block-manager" : { "file allocation unit size" : 4096, "blocks allocated" : 3, "checkpoint size" : 8192, "allocations requiring file extension" : 3, "blocks freed" : 0, "file magic number" : 120897, "file major version number" : 1, "minor version number" : 0, "file bytes available for reuse" : 0, "file size in bytes" : 16384 }, "btree" : { "column-store variable-size deleted values" : 0, "column-store fixed-size leaf pages" : 0, "column-store internal pages" : 0, "column-store variable-size leaf pages" : 0, "pages rewritten by compaction" : 0, "number of key/value pairs" : 0, "fixed-record size" : 0, "maximum tree depth" : 3, "maximum internal page item size" : 384, "maximum internal page size" : 4096, "maximum leaf page item size" : 3072, "maximum leaf page size" : 32768, "overflow pages" : 0, "row-store internal pages" : 0, "row-store leaf pages" : 0 }, "cache" : { "bytes read into cache" : 0, "bytes written from cache" : 127, "checkpoint blocked page eviction" : 0, "unmodified pages evicted" : 0, "modified pages evicted" : 0, "data source pages selected for eviction unable to be evicted" : 0, "hazard pointer blocked page eviction" : 0, "internal pages evicted" : 0, "overflow values cached in memory" : 0, "pages read into cache" : 0, "overflow pages read into cache" : 0, "pages written from cache" : 2 }, "compression" : { "raw compression call failed, no additional data available" : 0, "raw compression call failed, additional data available" : 0, "raw compression call succeeded" : 0, "compressed pages read" : 0, "compressed pages written" : 0, "page written failed to compress" : 0, "page written was too small to compress" : 2 }, "cursor" : { "create calls" : 1, "insert calls" : 1, "bulk-loaded cursor-insert calls" : 0, "cursor-insert key and value bytes inserted" : 34, "next calls" : 0, "prev calls" : 1, "remove calls" : 0, "cursor-remove key bytes removed" : 0, "reset calls" : 2, "search calls" : 0, "search near calls" : 0, "update calls" : 0, "cursor-update value bytes updated" : 0 }, "reconciliation" : { "dictionary matches" : 0, "internal page multi-block writes" : 0, "leaf page multi-block writes" : 0, "maximum blocks required for a page" : 0, "internal-page overflow keys" : 0, "leaf-page overflow keys" : 0, "overflow values written" : 0, "pages deleted" : 0, "page checksum matches" : 0, "page reconciliation calls" : 2, "page reconciliation calls for eviction" : 0, "leaf page key bytes discarded using prefix compression" : 0, "internal page key bytes discarded using suffix compression" : 0 }, "session" : { "object compaction" : 0, "open cursor count" : 5 }, "transaction" : { "update conflicts" : 0 } }, "totalIndexSize" : 16384, "indexSizes" : { "_id_" : 16384 }, "ok" : 1 }
Notice that mmapv1 version is missing "capped" from the stats result.
The likely cause is the difference in following files:
https://github.com/mongodb/mongo/blob/master/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp (~ line 709)
https://github.com/mongodb/mongo/blob/master/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp ( ~ line 817)