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

Release RSTL if we choose not to commit a prepared transaction after reacquiring it

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.0-rc2, 4.3.1
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.2
    • Repl 2019-07-01
    • 21

      This is a bug when commitTransaction is being retried. A previous commitPreparedTransaction reacquires the RSTL and then fails due to a uassert. When it fails, it doesn't release the RSTL due to two phase locking, rather stashing the RSTL. A prepared transaction cannot hold the RSTL while stashed or else a deadlock with stepdown is possible. We should release the RSTL if we do not commit the prepared transaction (we can't fail but we can choose not to commit).

            Assignee:
            judah.schvimer@mongodb.com Judah Schvimer
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: