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

add schema upgrade/downgrade phase to mongod setFeatureCompatibilityVersion command

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.5.11
    • None
    • Storage
    • None
    • Fully Compatible
    • Storage 2017-06-19, Storage 2017-07-10, Storage 2017-07-31

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: