[SERVER-8847] Implement dynamic storage format version migration Created: 05/Mar/13  Updated: 06/Dec/22  Resolved: 09/Jan/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Ben Becker Assignee: Backlog - Storage Execution Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-8751 Downgrading 2.4=>2.2 without dropping... Closed
Assigned Teams:
Storage Execution
Participants:

 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).


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