Clarify optime creation in TransactionParticipant

XMLWordPrintableJSON

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

      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
              Reporter:
              Judah Schvimer
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: