Running MongoDB 4.0.4 on Debian GNU/Linux 9 (stretch), with a collection capped in size to 2.9TB with unlimited number of documents with the WiredTiger engine.
{
...
"size" : NumberLong(3113851252530), // <= ~2.9T
"count" : 238059628,
"avgObjSize" : 13080,
"storageSize" : 863343902720.0, // <= ~804G
"capped" : true,
"max" : -1,
"maxSize" : NumberLong(3113851291136), // <= 2.9T
...
}
So size
reached the cap of 2.9T, I also started overwriting older documents. However I created the collection with storage size in mind, I couldn't care less about size of uncompressed data.
There's plenty of space left on disk (8TB). Also got the exact same behavior in a capped collection of 1M.
Can I cap a collection size by storageSize
instead?