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

Stepup should kill all user operations(that encounters prepare conflict) before taking RSTL lock in X.

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.12
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Repl 2019-05-20, Repl 2019-06-03

      Description

      Currently, there is a  3 way deadlock. Assume that we are transitioning from secondary to primary(signalDrainComplete).

      • Thread A (Read thread)  acquires RSTL lock in IX and  blocked by a prepared txn due to prepare conflict.
      • Stepup enqueues RSTL lock in X mode. And blocked behind A.
      • Prepared txn won’t be able commit until we are able to change our state to primary.

       

      Alternatively, thread A might have got blocked on prepare conflict due to conflicting DB/ collection lock. For eg. dbhash cmd. 

      EDIT: Blocked due to conflicting mongoDB locks  is not possible as secondary prepared txn yield mongoDB locks.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pavithra.vetriselvan Pavithra Vetriselvan
              Reporter:
              suganthi.mani Suganthi Mani
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: