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

Support dynamic storage options for record stores and indexes

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.8.0-rc5
    • Component/s: Storage, WiredTiger
    • Labels:
      None
    • Storage Execution

      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?

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            leifwalsh Leif Walsh
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: