Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
Description
Description
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)
SERVER-35627A new, empty .wt file is created- Unsalvageable collection data files
SERVER-35782Repair moves aside unsalvageable data files and creates empty ones in their place- Corrupt WiredTiger metadata files
SERVER-35629Salvage corrupt WiredTiger.wt/WiredTiger.turtle files by discarding corrupt data- “Orphaned” data files
SERVER-28734Recover collection files missing from the WiredTiger.wt metadataSERVER-35696Recover 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-35731If 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-28990MongoDB will not bind to a port when started with --repair.SERVER-36208The repairDatabase command has been removed in 4.1Engineering 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.)
Attachments
Issue Links
- documents
-
SERVER-19815 Improved mongod --repair option for WiredTiger
-
- Closed
-