Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9714

Clarify operation of compact command with WiredTiger

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: Server
    • Labels:
      None

      The compact command doesn't free wasted space due to fragmentation under WiredTiger. I think this isn't clear from the documentation. Two suggested places to change:

      Rewrites and defragments all data and indexes in a collection. On WiredTiger databases, this command will release unneeded disk space to the operating system.

      Clarify that the "defragments" only applies to mmapv1, not to WT.

      On WiredTiger, compact will rewrite the collection and indexes to minimize disk space by releasing unused disk space to the system. This is useful if you have removed a large amount of data from the collection, and do not plan to replace it.

      Re-iterate that it may not reclaim unneeded disk space due to fragmentation.

            Assignee:
            kevin.adistambha@mongodb.com Kevin Adistambha
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 20 weeks, 4 days ago