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

Add successfulDurationMicros for each commitType in mongos transactions serverStatus output

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.0-rc3, 4.3.1
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • v4.2
    • Sharding 2019-06-17

      As per the scope document, track the amount of time spent waiting on successful commits for each type of commit on mongos and add them to the "transactions" field in its serverStatus output.

      This was spun off from SERVER-40984.

       Proposed Implementation

      • Add atomic int64_t field "successfulDurationMicros" to RouterTransactionMetrics::CommitStats
      • When a transaction ends with TerminationCause::committed (i.e. successfully commits), add the transaction's commit duration to the atomic field
      • Update RouterTransactionMetrics::updateStats() and add "successfulDurationMicros" long type to the CommitTypeStats IDL type (in router_transaction_stats.idl) to include successfulDurationMicros in serverStatus output
      • Add unit / jstests
        • Update existing jstests/noPassthrough/router_transaction_metrics.js and add new cases to transaction_router_test.cpp
        • Some basic unit test cases: verify the field is incremented on successful commits, not on abort, not on unknown commit results, and that the field is cumulative across transactions

            Assignee:
            jamie.heppenstall@mongodb.com James Heppenstall (Inactive)
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: