Ensure the standby is able to start and commit an index build on receiving the corresponding oplog entries.

XMLWordPrintableJSON

    • 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.

            Assignee:
            Sandeep Dhoot
            Reporter:
            Sandeep Dhoot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: