[SERVER-35432] Add a method for printing out information about a slow transaction Created: 05/Jun/18 Updated: 29/Oct/23 Resolved: 25/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.2, 4.1.2 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | William Schultz (Inactive) | Assignee: | Nathan Louie |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | per-txn-metrics | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||||||||||||||
| Sprint: | Repl 2018-07-16, Repl 2018-07-30 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| 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:
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. |
| Comments |
| Comment by Githook User [ 16/Aug/18 ] |
|
Author: {'username': 'nxlouie', 'email': 'nathan.louie@10gen.com', 'name': 'Nathan Louie'}Message: (cherry picked from commit cdc82971d30cbac5115c532e8d296ba74aebb204) |
| Comment by Githook User [ 25/Jul/18 ] |
|
Author: {'name': 'Nathan Louie', 'email': 'nathan.louie@10gen.com', 'username': 'nxlouie'}Message: |
| Comment by William Schultz (Inactive) [ 06/Jul/18 ] |
|
The ultimate goal should be for the logging format to match that used in OpDebug::report, with the appropriate fields swapped to include transaction specific ones. Also, we will just hard-code the numYields field, instead of tracking it explicitly. It should always be 0 for multi-document transactions. |