After deleting many documents in my DocumentDB database, I reduced my collection to a size of 2.7GB but storageSize remains at 11GB. Is there any way to free up this space?
In the WiredTiger implementation for MongoDB, there’s a "compact" command. But when run on DocumentDB this produces: "errmsg" : "Feature not supported: compact"
Even after deletion my freeable memory did not increase. I would have expected the cached documents to take up less space. It seems like all 11GB are still cached.
2
Answers
Amazon states this is expected ($$) behavior. From their documentation:
To resolve you need to use MongoDB tooling into a brand new cluster:
According to latest official doc :
DocumentDB 4.0 will compact the space automatically, as for 3.6 will keep a high water mark.