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

Release the transaction lock resources and abort storage transaction for unprepared transactions on failure to unstash the transaction resources to opCtx.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.0-rc5, 4.3.1
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • v4.2, v4.0
    • Repl 2019-07-29
    • 17

      Currently, for any exception thrown after beginOrContinue and before unstashTransactionResources finishes, we don't abort the unprepared transactions implicitly. Instead we wait for it to abort eventually, either by the transaction reaper or any future requests with higher transaction number. To be noted, reaper would only abort the expired transactions and their life time of the transaction is controlled by an user defined server parameter transactionLifetimeLimitSeconds. As a result, we are holding the transaction lock and storage resources for an unbounded period of time that would make other DDL/CRUD operations to starve. So, it's good to reclaim the lock and storage resources early from the failed transaction.

      Note: Any individual statements in a transaction other than commit/abort cmd are definitely not retryable even if we attach a retyable error code as we attach TransientTransaction Error (TTE) label to it. TTE signals that it's safe to retry the entire transaction.

            Assignee:
            suganthi.mani@mongodb.com Suganthi Mani
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: