[SERVER-35129] Create a ServerTransactionsMetrics class and store it as a decoration on the ServiceContext Created: 21/May/18 Updated: 29/Oct/23 Resolved: 08/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.2, 4.1.1 |
| 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: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||||||||||||||
| Sprint: | Repl 2018-06-18 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 16/Aug/18 ] |
|
Author: {'username': 'nxlouie', 'email': 'nxlouie@umich.edu', 'name': 'Nathan Louie'}Message: (cherry picked from commit 77fdba110d24da099a73b46b16f1f3a5ab8ed849) |
| Comment by Githook User [ 08/Jun/18 ] |
|
Author: {'username': 'nxlouie', 'name': 'Nathan Louie', 'email': 'nxlouie@umich.edu'}Message: |
| Comment by William Schultz (Inactive) [ 07/Jun/18 ] |
|
We've decided to rename the class from MultiDocumentTransactionsStats to ServerTransactionsMetrics. |
| Comment by William Schultz (Inactive) [ 06/Jun/18 ] |
|
Fair enough. Jinny just committed |
| Comment by Spencer Brody (Inactive) [ 06/Jun/18 ] |
|
FWIW I'm in favor of full names over inconsistent abbreviations, so I'd vote for TransactionStats over TxnStats. |
| Comment by William Schultz (Inactive) [ 06/Jun/18 ] |
|
tess.avitabile We can do that as part of this ticket. I didn't call it out explicitly but I think I expected we would also add a call to the dummy function after we added it. I added a note in the description. |
| Comment by William Schultz (Inactive) [ 06/Jun/18 ] |
|
There's no real significance. We aren't very consistent with the "txn" vs "transaction" naming convention throughout the codebase so it's not that important to me at this point. I think I decided on "MultiDocumentTransactionsStats" because the "TransactionsStats" IDL type and "TransactionsSSS" class already used that convention and it will be used in conjunction with that. |
| Comment by Nathan Louie [ 06/Jun/18 ] |
|
What is the significance of writing out the word "Transactions" in this class, while the per-transaction stats class is called "TxnStats"? |
| Comment by Tess Avitabile (Inactive) [ 06/Jun/18 ] |
|
In what ticket will we start calling MultiDocumentTransactionsStats::updateStats() from TransactionSSS? |