Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12088

Docs for SERVER-19815: Make repair more robust with the WiredTiger storage engine






      (document with discretion)

      Starting mongod with --repair on a WiredTiger data directory now handles and recovers from the following scenarios:

      • Corrupt .wt files (existing behavior)
        • Collections are salvaged by discarding corrupt data
        • Indexes are unconditionally rebuilt
      • Missing .wt data files (for both collections and indexes)
      • Unsalvageable collection data files
        • SERVER-35782 Repair moves aside unsalvageable data files and creates empty ones in their place
      • Corrupt WiredTiger metadata files
        • SERVER-35629 Salvage corrupt WiredTiger.wt/WiredTiger.turtle files by discarding corrupt data
      • “Orphaned” data files
        • SERVER-28734 Recover collection files missing from the WiredTiger.wt metadata
        • SERVER-35696 Recover collection files missing from the _mdb_catalog
        • Note: there is no support for "importing" files that are missing from both metadata sources

      Additionally, --repair has the following new behavior:

      • SERVER-35731 If a repair operation modifies data, the node will not be able to rejoin a replica set without a full resync
        • Note: if a repair operation fails for any reason, the node will be unable to start up again without the --repair option.
      • SERVER-28990 MongoDB will not bind to a port when started with --repair.
      • SERVER-36208 The repairDatabase command has been removed in 4.1

      Engineering Ticket Description:

      The repair loop should be more forgiving about failures such as missing files and deal with collections or indexes missing from the catalog with a big warning message.

      Scope of changes

      • In 4.0, separate out a bit more --repair/repairDatabase (i.e. don't single source as much) so that we can more easily port to 4.2

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)




            kay.kim@mongodb.com Kay Kim (Inactive)
            kay.kim@mongodb.com Kay Kim (Inactive)
            0 Vote for this issue
            1 Start watching this issue


              5 years, 5 weeks, 5 days ago