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

Add a method for printing out information about a slow transaction

    XMLWordPrintable

Details

    • Fully Compatible
    • v4.0
    • Repl 2018-07-16, Repl 2018-07-30

    Description

      We need a method that will log relevant information about a completed transaction. This will be used to log information about transactions that run too long, similar to how we currently log slow operations.Ultimately, we want to include the following stats:

      • lsid, txnNumber, readConcern, autocommit
      • readTimestamp
      • OpDebug::AdditiveMetrics for the transaction
      • terminationCause
      • abortCause
      • timeActiveMicros
      • timeInactiveMicros
      • numYields
      • locks
      • totalDuration

      One approach would be to add a Session::reportTransaction method that logs this information in the appropriate format. It would have access to all the relevant transaction state already stored on the Session, including the SingleTransactionStats instance for that transaction, and its OpDebug::AdditiveMetrics object. To facilitate the logging of the stats from OpDebug::AdditiveMetrics object, we may also want to add an OpDebug::AdditiveMetrics::report method that generates a string showing the values all non-empty fields.

      Attachments

        Issue Links

          Activity

            People

              nathan.louie Nathan Louie
              william.schultz@mongodb.com William Schultz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: