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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication
    • None
    • Replication
    • ALL
    • 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

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: