Clean up transaction info logging in TransactionParticipant

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Minor Change
    • Repl 2025-03-03, Repl 2025-03-17, Repl 2025-03-31
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are many disparate sources of truth for transaction info logging in transaction_particpant.cpp and transaction_participant_test.cpp. TransactionParticipant has 3 methods (transactionInfoForLog - 2x, transactionInfoBsonForLog). Two of the three are just for tests.

       

      In transaction_participant_test, we also have buildTransactionInfoBSON and buildTransactionInfoString, which construct similar objects. Overall, there are ~5 places that need to be updated when changes are made to transaction logging. There are comments scattered around the code to keep the methods in sync, but that's a suboptimal solution. We should clean this up to establish fewer (ideally one?) source of truth for testing and another for the actual code path.

       

      Examples:

       

            Assignee:
            Myles Hathcock
            Reporter:
            Drew Beckmen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: