I have a example collection called events in MongoDB, the total uncompressed size was 14.3 TB and occupied size in disk is 4.2 TB. Recently i have deleted few documents and reduced the disk size from 14.3 TB to 3.1 TB but the storage size remains same as 4.2 TB.
I want to know the actual storage size got deleted or the current exact storage size.
Am using MongoDB 4.2 and i guess from 5.0 we have field called freeStoragesize added in collection.stats() command.
please suggest
Example collection stats
”'{
“ns” : “events.events”,
“size” : 3425712836056,
“count” : 327198795,
“avgObjSize” : 10469,
“storageSize” : 4640121118720,
“capped” : false,
“wiredTiger” : {
“metadata” : {
“formatVersion” : 1
},”’