[SERVER-35159] Track transactions latency and add to serverStatus output Created: 22/May/18  Updated: 29/Oct/23  Resolved: 09/Aug/18

Status: Closed
Project: Core Server
Component/s: Diagnostics, Replication
Affects Version/s: None
Fix Version/s: 4.1.2

Type: Task Priority: Major - P3
Reporter: William Schultz (Inactive) Assignee: Nathan Louie
Resolution: Fixed Votes: 0
Labels: global-txn-metrics
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-35157 Add transactions latency tracking to ... Closed
depends on SERVER-35300 Track total transaction duration in T... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2018-07-16, Repl 2018-07-30, Repl 2018-08-13
Participants:

 Description   

Once the OperationLatencyHistogram supports tracking transactions latency, we need to update the appropriate histogram counters whenever a transaction commits or aborts. We can do this by calling Top::incrementGlobalLatencyStats on abort or commit, with the appropriate arguments to indicate this operation is a transaction, and the total duration of the transaction. The total transaction duration should be available by using the transaction startTime tracked in TxnStats on that transaction's session.

Additionally, we will also need to update the OperationLatencyHistogram::append method so that it includes transaction latencies in a sub-document with key "transactions". We want the final serverStatus output to include the transaction latencies in the same format as the current read/write/command latencies, but in an opLatencies.transactions section.



 Comments   
Comment by Githook User [ 16/Aug/18 ]

Author:

{'username': 'nxlouie', 'email': 'nathan.louie@10gen.com', 'name': 'Nathan Louie'}

Message: SERVER-35159 Track transactions latency and add to serverStatus output

(cherry picked from commit e75f7fa2231cbd78d82923393de84d72702f9bcf)
Branch: v4.0
https://github.com/mongodb/mongo/commit/48c0ef6564b153b70ff307818c016c2cc36b3ab8

Comment by Githook User [ 09/Aug/18 ]

Author:

{'name': 'Nathan Louie', 'email': 'nathan.louie@10gen.com', 'username': 'nxlouie'}

Message: SERVER-35159 Track transactions latency and add to serverStatus output
Branch: master
https://github.com/mongodb/mongo/commit/e75f7fa2231cbd78d82923393de84d72702f9bcf

Comment by William Schultz (Inactive) [ 09/Aug/18 ]

Note: in this patch we are also ensuring that we use the same "now" time for recording various timing related transactions metrics.

Comment by Nathan Louie [ 12/Jul/18 ]

kyle.suarez in SERVER-35157:
If there is a behavioral change, this patch should include testing:

  • additional unit tests in db/stats/operation_latency_histogram_test.cpp, or at
    least modifications of the existing ones
  • tests for the collection histograms in
    jstests/core/operation_latency_histogram.js
  • tests for the global histogram in
    jstests/noPassthrough/global_operation_latency_histogram.js
Generated at Thu Feb 08 04:39:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.