[SERVER-12225] Allow query filter for compact operation Created: 31/Dec/13  Updated: 06/Dec/22  Resolved: 14/Sep/18

Status: Closed
Project: Core Server
Component/s: MMAPv1, Storage
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Jason R. Coombs Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-3752 padding factor overcompaction and rel... Closed
related to SERVER-4018 Add option to compact command to leav... Closed
Assigned Teams:
Storage Execution
Participants:

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


Generated at Thu Feb 08 03:27:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.