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

Clarify optime creation in TransactionParticipant

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Repl 2019-05-20, Repl 2019-06-03

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: