-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Diagnostics, Replication
-
Fully Compatible
-
v4.0
-
Repl 2018-06-18, Repl 2018-07-02
We want to track the total amount of "active" and "inactive" time spent by a transaction in SingleTransactionStats. A transaction is considered "active" if it is currently executing an operation, and considered "inactive" if it is idly waiting for a new operation to occur. To measure "active" time, we can use the "unstash" and "stash" transaction events to mark the beginning and end of an "active" period. When an operation stashes its transaction resources, we should add that operation's total running time to a cumulative SingleTransactionStats::timeActive field on the session. Similarly, when the first operation on a transaction completes, we should add its running time to SingleTransactionStats::timeActive.
- depends on
-
SERVER-35492 Rename TxnStats to SingleTransactionStats
- Closed
- is depended on by
-
SERVER-35310 Add timeActiveMicros and timeInactiveMicros to transaction sub-document of currentOp
- Closed