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

Allow query filter for compact operation

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: MMAPv1, Storage
    • Labels:
      None

      Description

      MongoDB provides a compact operation for removing (or re-allocating) padding for all cases in a collection. We have a use-case where it would be nice to compact a collection, but not to re-allocate padding for a select subset of the documents. This subset is easily described by a query.

      This feature would be a simple additional field to the compact operation. For example, the docs might include:

      field: spec
      type: object
      description: A MongoDB query indicating which records to be compacted.

      And the docs might state, "If a spec is provided, docs that don't match the spec may be moved but will retain their current padding (allocation size on disk)."

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-execution Backlog - Storage Execution Team
              Reporter:
              jason.coombs@yougov.com Jason R. Coombs
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: