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

Clarify optime creation in TransactionParticipant

    • Fully Compatible
    • Repl 2019-05-20, Repl 2019-06-03

      There is a line here that is no longer 100% true:

      // Transactions do not survive term changes, so combining "getTerm" here with the
      // recovery unit timestamp does not cause races.
      _speculativeTransactionReadOpTime = {readTimestamp, replCoord->getTerm()};
      

      This is no longer true for prepared transactions since they can survive term changes. I expect this is still safe since prepared transactions will do a write and not wait on the _speculativeTransactionReadOpTime but this should be double checked, and commented as such.

      "OpTime creation" in the transaction participant is done here as well, very similarly.

            Assignee:
            judah.schvimer@mongodb.com Judah Schvimer
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: