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

TransactionParticipant should not accept command names as strings

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication

      TransactionParticipant::unstashTransactionResources accepts a std::string cmdName in order to print useful diagnostic messages, and alter behavior conditionally for commitTransaction. In order to achieve that behavior, callers must pass the right magic case-sensitive string (for example). The simplest change we could make here is to internally use CommandInvocation::get(opCtx) to remove the need to pass a magic string in. Additionally, it looks like some of the internal logic to skip ticke acquisition should be encoded as an accessor on the opCtx or some similar tracking structure.

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: