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

allow secondary index builds to start without unlocking the RSTL

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • Storage
    • None
    • Execution Team 2019-11-04, Execution Team 2020-05-04
    • 0

    Description

      One of the planned improvements related to two phase index builds require secondary nodes in a replica set to be able to continue to run index builds on stepping up to primary. This requires the new primary node to hold the RSTL in order to write the commitIndexBuild or abortIndexBuild entries to the oplog.

      Index builds on secondary nodes current unlock the RSTL before starting (specifically, the scanning, draining, and completion phases). This logic was introduced in SERVER-41462 to avoid deadlocks with prepared transactions on replica set transitions such as step up/down.

      In SERVER-42824, we started unlocking the RSTL on both primary and secondary nodes before cleaning up a failed index build. This logic was recently moved into the IndexBuildsCoordinator in SERVER-43415.

      To support two phase index builds, it would be desirable to remove the RSTL unlocking logic.

      Attachments

        Issue Links

          Activity

            People

              louis.williams@mongodb.com Louis Williams
              benety.goh@mongodb.com Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: