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

Create a ServerTransactionsMetrics class and store it as a decoration on the ServiceContext

    • Fully Compatible
    • v4.0
    • Repl 2018-06-18

      To store server-wide metrics on multi-document transactions, we need a class that will store these metrics and an instance of it that is globally accessible. We will follow the same pattern used by the RetryableWritesStats class. We will create a ServerTransactionsMetrics class and add it as a decoration on the ServiceContext. This class should initially be just a skeleton, until we add member variables to track various metrics. We should also include a dummy void ServerTransactionsMetrics::updateStats(TransactionsStats* stats) method, that mirrors the method of RetryableWritesStats. Once we start to track metrics in this class, the updateStats method will allow us to copy the stored metrics into a serializable TransactionStats object, suitable for output in serverStatus.

      As a part of this ticket, we can call ServerTransactionsMetrics::updateStats from within TransactionsSSS::generateSection, even though it will initially do nothing.

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

              Created:
              Updated:
              Resolved: