[SERVER-62627] Implement the first phase of the restore algorithm where the storage engine prepares the backup Created: 13/Jan/22  Updated: 06/Dec/22  Resolved: 24/Jan/22

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

Type: Task Priority: Major - P3
Reporter: Gregory Wlodarek 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:
Depends
is depended on by SERVER-62628 Implement the abort logic during a fa... Closed
is depended on by SERVER-62630 Implement the first phase of the rest... Closed
is depended on by SERVER-62632 Implement the second phase of the res... Closed
is depended on by SERVER-62633 Implement the first phase of the rest... Closed
is depended on by SERVER-62634 Implement the final steps of the firs... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   
  • Retrieve a list of the files that exist in the _restore directory.
  • Remove any entries from the WiredTiger.backup file for files not present in the _restore directory.
  • Start an independent instance of WiredTiger on the _restore directory.
    • WiredTiger will reconstruct the WiredTiger.wt file from the WiredTiger.backup file.
    • The journal files will be replayed. Replaying journal files can result in new files being created.
  • Using the list of files retrieved before starting WiredTiger, drop any newly created collection and index files.
  • Iterate over the records in the _mdb_catalog.wt file and do the following:
    • Records mapping to files not present in the _restore directory will be removed.
    • Check that all of the index files are present for a collection being restored.
    • Modify the namespace fields where a database rename was requested.
    • Modify the namespace fields of the record representing the oplog to local.oplog.restore.
  • If a collection to restore is specified in config.system.restore but is not present in the _mdb_catalog.wt and vice-versa, abort the procedure.
  • Take a checkpoint.
  • For each collection and its indexes to restore, and the oplog:
    • Export the file and table metadata from WiredTiger (see here).
    • Export the catalog entry (_mdb_catalog.wt) and fast count (sizeStorer.wt).
  • Shutdown the WiredTiger instance.

Generated at Thu Feb 08 05:55:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.