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

Rollback should kill all user operations before taking RSTL lock in X.

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.12
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • Repl 2019-05-20, Repl 2019-06-03

      Currently, there is a  3 way deadlock. Assume that we are transitioning from secondary to rollback.

      • Thread A (Read thread)  acquires RSTL lock in IX and  blocked by a prepared txn due to prepare conflict.
      • Rollback enqueues RSTL lock in X mode. And blocked behind A.
      • Prepared txn won’t be able commit until we transition out of rollback.

      Alternatively, thread A might have got blocked on prepared transaction 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.

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

              Created:
              Updated:
              Resolved: