Description:
(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.