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.
- is related to
-
SERVER-45582 Add a ProgressMeter to initial sync index builds
- Closed