Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-80120

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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • 5

    Description

      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.
          }
      )
      

      Attachments

        Activity

          People

            sean.watt@mongodb.com Sean Watt
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: