I have uploaded ~30GB of files to Mongo using Parse and store references to the ParseFile in a File class.
When I deleted them all yesterday using await file.destroy({ useMasterKey: true });
the ParseFile is deleted and the url to it says “file not found”, but the size of the Mongo database does not shrink.
I checked the size of the fs.chunks using db.fs.chunks.stats().storageSize
collection and it says 30318993408 (28GB).
I checked the logs and found
error: Error deleting a file: FileNotFound {"stack":"Error: FileNotFound GridFSBucketAdapter.deleteFile (/home/parse/node_modules/parse-server/lib/Adapters/Files/GridFSBucketAdapter.js:91:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) async deleteHandler (/home/parse/node_modules/parse-server/lib/Routers/FilesRouter.js:253:7)"}
I am using the GridStoreAdapter
and not the GridFSBucketAdapter
. I have not set up any filesAdapter
option when starting Parse server as the documentation says.
Why does this happen? Can I just purge the fs.chunks manually?