[SERVER-19062] "compact" improvement for WiredTiger Created: 20/Jun/15  Updated: 22/Jun/15  Resolved: 20/Jun/15

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

Type: Improvement Priority: Major - P3
Reporter: Andrew Ryder (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-16413 Storage engines that allow online com... Closed
Related
Participants:

 Description   

RE: http://docs.mongodb.org/manual/reference/command/compact

The implementation of the "compact" command assumes a set of MMAP-based limitations, such as taking an exclusive database lock and, in the case of a secondary, force in to RECOVERING mode - neither of these actions is essential when running WiredTiger.

Additionally, WiredTiger can release free space back to the storage system without needing to rebuild everything, unlike MMAP, but this ability is not exploited.

Access to these various extra functionality of WiredTiger specifically in regards to compaction is the purpose of this ticket. What form this takes is left for discussion.



 Comments   
Comment by Igor Canadi [ 22/Jun/15 ]

Also SERVER-17255

Comment by Daniel Pasette (Inactive) [ 20/Jun/15 ]

duplicate of SERVER-16413

Comment by Andrew Ryder (Inactive) [ 20/Jun/15 ]

A two-birds-with-one-stone approach might be to make options to "compact" be more expressive of intent.

At the moment the "force" option merely overrides the normal result from exclusive-lock on the primary and doesn't really convey intent, meaning that if storage-engines behaved differently, you'd get different results.

It would be good if there were an option that could express intent, for example:

{ compact: "test", liveOnly: true }

This way the preference of whether to go ahead can be based on storage-engine capability. This could be regarded as orthogonal to "force", with "force:true" to make it work on primary, but only if it can be done live (since a "compact" operation would have performance impacts regardless of storage-engine in use).

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