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

3 way deadlock between applyOps cmd, prepared transaction and secondary oplog fetcher initiated find command

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Blocked
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Replication
    • Labels:
      None
    • Operating System:
      ALL
    • Linked BF Score:
      65

      Description

      3 way deadlock involving applyOps cmd, prepared transaction and oplog find command  can occur on a primary.
      1) applyOps cmd enqueues global lock in X mode and stuck behind prepared transaction due to global lock conflict.
      2) Prepared transaction holding global lock in IX mode, waits for the prepareTransaction oplog entry to be majority replicated. But stuck behind the Secondaries oplog replication.
      3) Secondary oplog fetcher initiated find cmd on oplog collection is waiting for global lock to acquire in IS mode but stuck behind the applyOps cmd due to enqueued global lock .

      To be noted, 'applyOps' cmd by default runs in atomic mode. Atomic mode apply ops consisting of CRUD ops always take global lock in X mode.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-repl Backlog - Replication Team
              Reporter:
              suganthi.mani Suganthi Mani
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: