Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39068

Replication of simultaneous index builds startIndexBuild and commitIndexBuild oplog entries

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.8
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
    • 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.

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: