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

Index builds should hold RSTL to prevent replication state changes after deciding to commit or abort

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc2, 4.7.0
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-04-20, Execution Team 2020-05-04
    • 48

      IndexBuildsCoordinatorMongod::_waitForNextIndexBuildAction() holds RSTL only for the while loop scope to perform primary check. Because of that, the primary check is  no longer valid after this point. This can lead stepped down node(secondary) trying to commit or abort without getting commit/abortIndex oplog entry for 2 phase index builds. In turn, it results in this invariant failure.

       

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: