-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Storage
-
Fully Compatible
-
Storage NYC 2019-02-11, Storage NYC 2019-02-25
-
8
A temporary command, twoPhaseCreateIndexes, already exists. SERVER-39066 sets up the OpObserver and oplog.cpp. Wait for SERVER-37643 to set up builders in the IndexBuildsCoordinator/Manager.
Then, set up a code path into the Coordinator/Manager that will do a two phase index build, and have the twoPhaseCreateIndexes command call it. The twoPhaseIndexBuild flag in the ReplIndexBuildState object should be set. A startIndexBuild oplog entry should optionally (based on the Coordinator's twoPhaseIndexBuild setting) be written in the same WUOW as the index catalog entry initialization write: this should parallel the oplog write on commit seen here and here. The startIndexBuild oplog entry should start an index build, which I think is already hooked up, just inactive and not tested. The commitIndexBuild oplog entry should optionally be swapped out with the createIndexes oplog entry currently written on index commit, based on the twoPhaseCreateIndexes setting. Secondaries don't do anything on receipt of commitIndexBuild, and we will leave that to implement in a separate patch.
- depends on
-
SERVER-37643 add createIndexes command logic to the index build interface
- Closed
-
SERVER-38701 Prohibit new simultaneous index builds oplog entries in applyOps
- Closed
- is depended on by
-
SERVER-37940 Establish a code path for FCV 4.0 and FCV 4.2 index builds
- Closed
-
SERVER-39239 Two-phase index builds on secondaries will wait for the commitIndexBuild oplog entry before committing.
- Closed