jSince, on primary, we use IndexBuildsCoordinator::createIndexes() only to build system indexes and does not use the thread pool, I feel this createIndexes() should always generate the createIndexes oplog entry for the index build, considering it as a single phase index build. Also, building system indexes takes less time. So, it's ok for secondaries to do the system index build as foreground index build during steady state replication. By this we can make the behavior of not using thread pool consistent between primary and secondary.
To be noted, it seems, this createIndexes() is called to
1) create system Indexes during startup (writes not replicated).
2) create system Indexes during primary drain phase (writes replicated).
3) Secondaries oplog applier performing foreground index building.
- related to
-
SERVER-47182 Single-phase index builds should run synchronously on secondaries
- Closed