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

Use WiredTiger salvage API for repairing metadata files

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.3, 4.1.4
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.0
    • Epic Link:
    • Sprint:
      Storage NYC 2018-09-10, Storage NYC 2018-09-24
    • Linked BF Score:
      0

      Description

      WT will be adding functionality to salvage metadata information that would provide a similar result to the original goal of this ticket which is left quoted.

      When running MongoDB with the --repair flag and we find that the WiredTiger.wt metadata file is corrupted, we should attempt to salvage the metadata file.

      Because the WiredTiger.wt file cannot be salvaged directly, this process might work like so (similar to the repair-wt.sh script used in support).

      • Create a new WiredTiger db in a new directory with an empty table named "tmp"
      • Copy the WiredTiger.wt file into the new db directory as tmp.wt
      • Run salvage on "tmp" in the new db directory
      • Extract the salvaged checkpoint information for "tmp" from the new db's metadata
      • Copy the salvaged tmp.wt back as WiredTiger.wt to the original db path
      • Replace the checkpoint information in WiredTiger.turtle with the salvaged checkpoint information

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: