Transactions on secondaries should take IS locks instead of IX

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Replication
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: