In 2.4.9, if you specified a 'size' value for a non-capped collection, the storage space was pre-allocated. In master, the size value is no longer honored for non-capped collections. This is a regression caused by the changes from SERVER-8412.
2.4.9:
> var myDB = db.getSiblingDB('repro'); > myDB.dropDatabase(); { "dropped" : "repro", "ok" : 1 } > myDB.createCollection('sizetest', {size: 10000000}); { "ok" : 1 } > myDB.sizetest.stats(); { "ns" : "repro.sizetest", "count" : 0, "size" : 0, "storageSize" : 10002432, "numExtents" : 1, "nindexes" : 1, "lastExtentSize" : 10002432, "paddingFactor" : 1, "systemFlags" : 1, "userFlags" : 0, "totalIndexSize" : 8176, "indexSizes" : { "_id_" : 8176 }, "ok" : 1 }
master:
> var myDB = db.getSiblingDB('repro'); > myDB.dropDatabase(); { "dropped" : "repro", "ok" : 1 } > myDB.createCollection('sizetest', {size: 10000000}); { "ok" : 1 } > myDB.sizetest.stats() { "ns" : "repro.sizetest", "count" : 0, "size" : 0, "storageSize" : 8192, "numExtents" : 1, "nindexes" : 1, "lastExtentSize" : 8192, "paddingFactor" : 1, "systemFlags" : 1, "userFlags" : 1, "totalIndexSize" : 8176, "indexSizes" : { "_id_" : 8176 }, "ok" : 1 }
Version: 575c9cbe27ba6b9ba56b810e42508d120ae44a94
- is duplicated by
-
SERVER-14237 The "size" parameter for non-capped collections stopped being honored in HEAD
- Closed
- is related to
-
SERVER-8412 repairDatabase: no Cloner, and use multi index builder
- Closed
- links to