[SERVER-16960] Support dynamic storage options for record stores and indexes Created: 20/Jan/15  Updated: 06/Dec/22  Resolved: 15/Apr/19

Status: Closed
Project: Core Server
Component/s: Storage, WiredTiger
Affects Version/s: 2.8.0-rc5
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Leif Walsh 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
is related to SERVER-18879 Add "indexOptionDefaults" to createCo... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

The collMod command allows the user to make modifications to the record store after the collection is created. It seems like the natural interface for modifying storage engine-specific options, such as the compression method, for an existing collection. I have a few questions related to this:

1. While storage engine-specific options can be specified at create time (e.g. {storageEngine: {<engine-name>:

{options...}

}}), they only affect the record store, and are not provided to the {_id: 1} index which is also created at collection create time. Could there be a facility for providing options for that index at create time? Other indexes' options can be set in createIndex, but the {_id: 1} index doesn't have this opportunity if you also want to specify options for the record store.

2. These storage engine-specific options are stored in the catalog in CollectionOptions. If a user wants to modify one of these options later, I'd imagine they could use collMod, but this does not currently update the collection's catalog entry. I think it should, or at least there should be a facility to do so inside setCustomOption. Without such a facility, these options would need to be stored as duplicates inside the storage engine, and would have to override those in the catalog later after restart, and duplicated, conflicting state seems like a disaster waiting to happen.

3. While collMod allows for the expireAfterSeconds value to be modified for an index, it does not permit any other storage engine-specific options to be set, the way setCustomOption allows for arbitrary modification of the record store's options. Could this be added as well?



 Comments   
Comment by Daniel Pasette (Inactive) [ 27/Jul/15 ]

SERVER-18879 will allow users to define options for the _id index at collection creation time, which addresses part of this issue.

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

Not sure what the precise best interface for this is at this point, but options to the _id index are special and have to be specified at collection creation time.

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