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

Add a ProgressMeter to the index build startup recovery code path

    • Fully Compatible
    • v4.4, v4.2
    • Execution Team 2020-05-18

      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.

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

              Created:
              Updated:
              Resolved: