[DOCS-2217] Comment on: "manual/reference/command/compact.txt" Created: 11/Nov/13  Updated: 03/Nov/17  Resolved: 11/Nov/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Improvement Priority: Major - P3
Reporter: Ofer Cohen Assignee: Sam Kleinman (Inactive)
Resolution: Incomplete Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: http://docs.mongodb.org/manual/reference/command/compact/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/30.0.1599.114 Chrome/30.0.1599.114 Safari/537.36
Screen Resolution: 1920 x 1200
repo: docs
source: reference/command/compact


Participants:
Days since reply: 10 years, 13 weeks, 6 days ago

 Description   

"compact requires up to 2 gigabytes of additional disk space while running. Unlike repairDatabase, compact does not free space on the file system."
...
Size and Number of Data Files
compact may increase the total size and number of your data files, especially when run for the first time. However, this will not increase the total collection storage space since storage size is the amount of data allocated within the database files, and not the size/number of the files on the file system."

After testing compact command, it seems it takes much more than 2GB additional space. We've tested it on 438GB partition with 90% capacity (part of 4 shards) and the compact was failed.

Please advise.
Thanks, Ofer



 Comments   
Comment by Daniel Pasette (Inactive) [ 15/Nov/13 ]

compact allocates up to an additional extent of maximum size (2GB) which it uses to do the compaction. i'd be curious to see your particular case as it would be a bug.

Comment by Ofer Cohen [ 12/Nov/13 ]

It's fine that it needed more space and it's not consistent. The problem is that the documentation is misleading and can be understood that in all cases compact need only 2 GB additional space, and this is incorrect.
In other simple words - this is a documentation bug and need to be fixed. There is no need for any support on my side.

Comment by Sam Kleinman (Inactive) [ 11/Nov/13 ]

This behavior is not consistent with the implementation of compact. If you could open a support case in one of the MongoDB support cases, we can help track down the exact cause of the issue you're encountering. See http://mongodb.org/about/support for more information about MongoDB support resources.

Generated at Thu Feb 08 07:42:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.