Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
2.0.1
-
None
-
CentOS 5.6
-
Linux
Description
After I've run an inline compaction, the DB actually grows in size. I've seen this happening on my production environment (where I actually ran out of RAM because of this) and I've just reproduced it on my development environment.
After running db.repairDatabase() the size shrinks back.
Below is the Mongo shell output:
> show dbs
admin (empty)
local (empty)
test (empty)
mydb 1.953125GB
> db.mycollection.runCommand('compact')
> show dbs
admin (empty)
local (empty)
test (empty)
mydb 3.9521484375GB
> db.stats()
> db.stats()
{
"db" : "mydb",
"collections" : 7,
"objects" : 1017491,
"avgObjSize" : 588.1718894810863,
"dataSize" : 598459604,
"storageSize" : 705445888,
"numExtents" : 44,
"indexes" : 5,
"indexSize" : 75938688,
"fileSize" : 2080374784,
"nsSizeMB" : 16,
"ok" : 1
}
> show dbs
admin (empty)
local (empty)
test (empty)
mydb 1.953125GB