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

Audit uses of TransactionParticipant::SideTransactionBlock

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • Replication
    • v4.2
    • Repl 2019-06-03, Repl 2019-06-17, Repl 2019-07-01

    Description

      We use SideTransactionBlock to do things outside a transaction, while in a multi-document transaction. E.g., when OpObserverImpl writes the prepare oplog entry or (in SERVER-36494) when TransactionParticipant writes to another collection in the "local" DB.

      It seems error-prone that a side transaction block only partly masks the state of the outer transaction. For example, state methods like TransactionParticipant::inMultiDocumentTransaction() reflect the outer transaction.

      This can cause mistakes when recursing into the TransactionParticipant while doing an operation in a side transaction via

      TransactionParticipant method -> OpObserverImpl method -> TransactionParticipant::addTransactionOperation
      

      Audit uses of SideTransactionBlock and consider extending the SideTransactionBlock to more thoroughly mask evidence of the TransactionParticipant's outer transaction.

      Attachments

        Issue Links

          Activity

            People

              judah.schvimer@mongodb.com Judah Schvimer
              jesse@mongodb.com A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: