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

add schema upgrade/downgrade phase to mongod setFeatureCompatibilityVersion command

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.11
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • Storage 2017-06-19, Storage 2017-07-10, Storage 2017-07-31

      This involves adding a schemaVersion read-only global parameter (see FeatureCompatibility in server_options.h ).

      In setFeatureCompatiblityCommand, for the upgrade case, first upgrade the schemaVersion and then iterate over all collections in the catalog, and perform an empty collMod command on each. In turn collMod should call a new CollectionCatalogEntry::updateUUID() method, which assigns a new UUID if there is none and the schema is 3.6, or removes it if there is one and the schema is 3.4. In both cases persist the new UUID, and on commit update the copy in the catalog using a new Collection::updateUUID() method.

      In userCreateNSImpl, the schemaVersion should be used (in addition to the temporary enableCollectionUUIDs parameter) to determine whether to assign UUIDs or not.

            Assignee:
            maria.vankeulen@mongodb.com Maria van Keulen
            Reporter:
            geert.bosch@mongodb.com Geert Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: