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

Transactions on secondaries should take IS locks instead of IX

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication
    • None
    • Replication

    Description

      Operations in multi-statement transactions take IX locks. This is because if a transaction starts with a read, and we later perform a write, there is no way to upgrade the lock mode. Transactions on secondaries should never include writes (and attempting to write should implicitly abort the transaction), so there is no reason to take IX locks. Moreover, a stashed transaction holding IX locks can block an operation that needs an S lock (such as listCollections), which can block oplog application. Thus it is important that transactions on secondaries do not take IX locks like they do on primaries.

      This work requires that we use two-phase locking for shared locks in read-only transactions on secondaries.

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: