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

Deadlock involving commands acquiring global X lock and prepared transactions waiting for write concern

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • ALL
    • v4.2
    • Repl 2019-10-21, Repl 2019-11-04
    • 21

      DropDatabase or any commands that acquire the global lock in X mode can be blocked by prepared transactions. The enqueued global X lock can block oplog queries which need the global IS lock. If these oplog queries and the data replication are needed by the prepared transaction's write concern, then the prepare transaction cannot make progress. Thus a deadlock occurs.

      In reality, the coordinator may time out and decide to abort the transaction, but this could be an issue for testing.

            Assignee:
            evin.roesle@mongodb.com Evin Roesle
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: