Add the new compaction "freeSpaceTargetMB" option to the compact API

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • 5
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The current compact command only takes in a collection name and runs compact against the collection and index tables as indicated in the existing documentation for MongoDB 6.0. This project modifies the API while ensuring backward compatibility by adding a new field indicating the minimum space compact should be able to reclaim.

      A prototype of the API can be found below:

      db.runCommand(
          {
              compact: <collection name>,
              freeSpaceTargetMB: <number>, // Optional, minimum space available to reclaim in MB, default is 20MB.
          }
      )
      

              Assignee:
              Sean Watt
              Reporter:
              Gregory Wlodarek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: