The full code to create an index and handle errors with the IndexBuildsCoordinator is 70 lines long.
In order to replace the usages of MultiIndexBlock and manual OpObserver->onCreateIndex calls, we should factor this all out.
We should consider implementing the following:
- A helper that is synchronous and only returns when an index build completes or fails
- A helper that builds an index on an empty collection on the current thread to prevent context switches.
- related to
-
SERVER-44436 IndexBuildsCoordinatorMongod should always delegate index build to thread pool
- Closed
-
SERVER-44437 remove DBDirectClient reference from ShardLocal::createIndexOnConfig
- Closed