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

Audit uses of TransactionParticipant::SideTransactionBlock

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
    • v4.2
    • Repl 2019-06-03, Repl 2019-06-17, Repl 2019-07-01

      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.

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