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

Implement dynamic storage format version migration

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Won't Do
    • None
    • None
    • Storage
    • None

    Description

      The idea here is to implement a persistent script which can automatically modify the storage format when upgrading/downgrading versions that may break compatibility. Consider the following sequence of events:

      1. User upgrades from v2.6 to v2.8 and starts mongod.
      2. mongod stores a set of migration scripts in a serialized file.
      3. mongod migrates the datafiles to a new format and bumps the pdfile version.
      4. User downgrades to v2.6
      5. mongod sees pdfile version is for v2.8, then looks for a 'v2.8 to v2.6' migration script.
        1. If found, mongod executes the script.
        2. Otherwise, existing behavior is preserved.
      6. mongod overwrites the pdfile version to v2.6 (possibly storing a list of past version migrations).

      If, for example, the format change involved a new data structure for free space management, the script could be written to either execute a repair operation, or read the v2.8 data structure(s) and write out the v2.6 data structure(s).

      Attachments

        Issue Links

          Activity

            People

              backlog-server-execution Backlog - Storage Execution Team
              benjamin.becker Ben Becker
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: