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

Make incoming retryable transactions abort conflicting transactions once

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc10, 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • v6.0
    • Sharding NYC 2022-05-30, Sharding NYC 2022-06-13

      When a new retryable transaction runs on a mongod and a retryable transaction for the same client retryable write (ie same txnNumber in the session id) is active, the incoming transaction must wait for the existing transaction to complete, which happens via throwing a RetryableTransactionInProgress exception. This is meant to avoid a livelock if multiple routers are running the same client retryable write that requires retryable transactions, e.g. after a network error between a client and a mongos that leads the client to retry on a different mongos. A downside of this is if the router for the existing transaction has crashed or otherwise given up (e.g. after certain Interruption errors) the incoming transaction from the retry will wait for the existing transaction to time out. In practice, it is likely the original router has stopped running the transaction if a retry arrives, so the retry should interrupt the existing transaction. But to prevent livelocks if the original router is still running, only the first conflict should cause an interruption.

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: