Check TransactionRouter initialization before implicitly aborting during shutdown

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: 8.0.0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • CAR Team 2025-07-21
    • 200
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When mongos is shutting down we prohibit creation of new transactions since we are draining the node from running commands.

      This is implemented by a uassert that triggers before we initialize the transaction state.

      However, usages of the transaction router may at times attempt to abort a transaction in case any error occurs, leading us to call TransactionRouter::implicitlyAbortTransaction in cases where we don't have the transaction initialized.

      This results in a confusing yet harmless invariant failure since there is no transaction to abort.

              Assignee:
              Jordi Olivares Provencio
              Reporter:
              Jordi Olivares Provencio
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: