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

Allow query filter for compact operation

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

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

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

              Created:
              Updated:
              Resolved: