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.