-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
So far it seems the background thread can stay as is, we just need to ensure to not generate any writes inside it.
`IndexBuildsCoordinatorMongod::_startIndexBuild()` waits until the builder thread has successfully initialized the index by calling `startFuture.getNoThrow()`. This ensure that `applyStartIndexBuild()` does not return until the thread has successfully created all the idents.
`IndexBuildsCoordinator::applyCommitIndexBuild()` also waits for the index build to complete on the builder thread by calling
auto fut = replState->sharedPromise.getFuture();
// Throws if there was an error building the index.
fut.get();
`IndexBuildsCoordinator::_runIndexBuild` completes index build by calling `replState->sharedPromise.emplaceValue()`. {}This ensure that `applyCommitIndexBuild()` does not return until the thread has successfully committed the index build.
Creating separate tickets to ensure the thread does not generate any new writes of its own on the standby. Keeping this ticket open until these new tickets are done and we can verify that the above plan works.
- depends on
-
SERVER-109783 Ensure the standby does not generate any table writes when performing a primary-driven index build.
-
- Closed
-
-
SERVER-109784 Ensure the standby does not generate any writes for the temporary tables.
-
- Closed
-