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

Advance TransactionRouter firstStmtId on continue if no participants were targeted

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • None
    • Sharding NYC
    • Fully Compatible
    • Sharding 2022-07-25

    Description

      The TransactionRouter tracks the statement number of the first command it received and increments its notion of the current statement whenever the transaction is continued. There are behaviors conditional on if the current statement is the first overall, like retrying on certain stale config errors.

      If the transaction API is used on a mongos within a client transaction, the API's first recursive command will continue the TransactionRouter transaction started by the client so despite that command likely being the first that could target a participant, the router will have opted out of all first overall statement behaviors.

      Since the API will be a common use case going forward, we should enable those behaviors by having the TransactionRouter track the first statement number to actually target a participant, instead of the first overall. This can be accomplished by checking if the participant list is non-empty before incrementing the latestStmtId. 

      Attachments

        Activity

          People

            backlog-server-sharding-nyc [DO NOT USE] Backlog - Sharding NYC
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: