Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-49340

Add repair mode to validate for startup --repair

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.7.0, 4.4.10
    • None
    • None
    • Fully Compatible
    • v4.4
    • Execution Team 2020-07-13, Execution Team 2020-07-27

    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.

      Attachments

        Issue Links

          Activity

            People

              shinyee.tan@mongodb.com Shin Yee Tan
              louis.williams@mongodb.com Louis Williams
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: