Add a mode to validate internally that repairs data. This should be used by startup --repair before attempting to rebuild indexes.
The CollectionValidation::validate() function will accept a RepairData enum flag to allow it to fix certain problems that do not require a full index rebuild. This new “repair mode” will be used by startup repair in repairCollections to avoid rebuilding indexes in certain corruption cases.
If there were validation errors and they were all fixed, validate will report valid: false in ValidateResults and a new member repairStatus: OK
If there were validation errors and they were not all fixed, validate will report valid: false and repairStatus: <error Status>. This indicates a partial repair and the database is still in an inconsistent state.
If there were no validation errors, validate will report valid: true and repairStatus: OK.
- is depended on by
-
SERVER-46147 Update repair to fix multikey errors without performing an index rebuild
- Closed
-
SERVER-49103 Validate repair mode should fix up missing and extra index entries
- Closed
-
SERVER-49341 Validate repair mode should delete records that fail BSON validation
- Closed