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

Add a ProgressMeter to the index build startup recovery code path

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.2.8, 4.4.0-rc7, 4.7.0
    • Storage
    • Fully Compatible
    • v4.4, v4.2
    • Execution Team 2020-05-18

    Description

      The regular index build code path has a ProgressMeter setup in MultiIndexBlock::insertAllDocumentsInCollection. Startup recovery index build go through MultiIndexBlock::insert, which has no ProgressMeter.

      A straightforward solution would be to add another ProgressMeter to the IndexBuildsManager::startBuildingIndexForRecovery code.

      Perhaps the ProgressMeter could be placed in some common code path, like the MultiIndexBlock::init() function. Though I do not know whether that is run on the same thread today as insert() and insertAllDocumentsInCollection(), or whether it will continue to be in future.

      Alternatively, maybe we can change startup index builds to not validate the collection BSON: perhaps validate the collection data first. Then the startup index build code could be merged into the regular index build code, reducing code duplication.

      I advocate for this last solution, if it is possible to change the repair code to validate collection BSON before index building – repair might even already do this, I did not look.

      Attachments

        Issue Links

          Activity

            People

              james.heppenstall@mongodb.com James Heppenstall
              dianna.hohensee@mongodb.com Dianna Hohensee
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: