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

Push commitTransaction's check for a majority-committed prepare down into the TransactionParticipant

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.13
    • Component/s: Replication
    • Labels:
      None

      Description

      SERVER-40269 introduced a check in the execution of the commitTransaction command that would cause the server to usassert if the commit was for a prepare that has not yet been majority committed. For that purpose, the command needs to acquire the replication coordinator mutex while it has its session checked out, so it needs to be interruptible. Otherwise, it can deadlock with stepdown, which holds the replication coordinator mutex while trying to check out sessions to make prepared transactions yield their locks.

      We can avoid this deadlock if we move the check into TransactionParticipant::commitPreparedTransaction, soon after the RSTL lock acquisition. Stepdown would already be holding the RSTL, and we would be interruptible while waiting to acquire it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vesselina.ratcheva Vesselina Ratcheva
              Reporter:
              vesselina.ratcheva Vesselina Ratcheva
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: