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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.4.0-rc2, 4.7.0
    • None
    • Storage
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-04-20, Execution Team 2020-05-04
    • 48

    Description

      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.

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: