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

allow secondary index builds to start without unlocking the RSTL

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Sprint:
      Execution Team 2019-11-04, Execution Team 2020-05-04
    • Linked BF Score:
      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

              Assignee:
              louis.williams Louis Williams
              Reporter:
              benety.goh Benety Goh
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: