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)."
- related to
-
SERVER-3752 padding factor overcompaction and related needed improvements
- Closed
-
SERVER-4018 Add option to compact command to leave in padding.
- Closed