[SERVER-49340] Add repair mode to validate for startup --repair Created: 07/Jul/20  Updated: 29/Oct/23  Resolved: 14/Jul/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.7.0, 4.4.10

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Shin Yee Tan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-46147 Update repair to fix multikey errors ... Closed
is depended on by SERVER-49103 Validate repair mode should fix up mi... Closed
is depended on by SERVER-49341 Validate repair mode should delete re... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Execution Team 2020-07-13, Execution Team 2020-07-27
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 17/Sep/21 ]

Author:

{'name': 'Shin Yee Tan', 'email': 'shinyee.tan@mongodb.com', 'username': 'shinyeet'}

Message: SERVER-49340 Add repair mode to validate for startup --repair

(cherry picked from commit 674b8eb)
Branch: v4.4
https://github.com/mongodb/mongo/commit/f330a61b9b47953d4c996bc529e7c2bdc1cc4239

Comment by Githook User [ 14/Jul/20 ]

Author:

{'name': 'Shin Yee Tan', 'email': 'shinyee.tan@mongodb.com'}

Message: SERVER-49340 Add repair mode to validate for startup --repair
Branch: master
https://github.com/mongodb/mongo/commit/674b8eb2cf067ce3c6fff5e07dc65d4f7e37ea49

Generated at Thu Feb 08 05:19:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.