TransactionParticipant generates applyOps entry information for unprepared transactions rather than delegating to OpObserverImpl

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution NAMR Team 2023-07-10, Execution NAMR Team 2023-07-24
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      OpObserverImpl::onUnpreparedTransactionCommit() currently [generates the applyOps oplog entry information||https://github.com/mongodb/mongo/blob/f9a49ec48ad035ca2f6701f5f458aef57dd70438/src/mongo/db/op_observer/op_observer_impl.cpp#L1760] internally for writing the unprepared applyOps entries to the oplog and pass to the change streams pre-image helper. We also reserve the oplog slots within this function.

      Doing both of these operations within the OpObserverImpl method makes it inconvenient for us to extract the change streams pre-image logic into a separate OpObserver implementation in SERVER-78310. We should consider generating the applyOps info at the callsite in TransactionParticipant and pass it into the OpObserver interface.

              Assignee:
              Benety Goh
              Reporter:
              Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: