[SERVER-36501] serverStatus support for prepared transactions Created: 07/Aug/18 Updated: 29/Oct/23 Resolved: 06/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.5 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Jason Chan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | prepare_diagnostics | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | Repl 2018-10-22, Repl 2018-11-05, Repl 2018-11-19 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||
| Description |
|
Similar to the transactions diagnostics project, we want to maintain certain metrics in the serverStatus section. The TransactionsSSS::generateSection method returns a BSON object that goes into the transactions section of the serverStatus output. This ticket can be split into multiple commits if needed. We will want to output:
We will need to add these counters to ServerTransactionMetrics and the transactions_stats.idl class, so that we can serialize these counters to the serverStatus output object in the TransactionsSSS::generateSection method. We will also update the TransactionMetricsObserver to increment/decrement the stats when appropriate. |
| Comments |
| Comment by Githook User [ 06/Nov/18 ] |
|
Author: {'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com'}Message: |
| Comment by Githook User [ 01/Nov/18 ] |
|
Author: {'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com'}Message: |
| Comment by Githook User [ 01/Nov/18 ] |
|
Author: {'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com'}Message: |
| Comment by Githook User [ 01/Nov/18 ] |
|
Author: {'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com'}Message: |
| Comment by Judah Schvimer [ 19/Oct/18 ] |
|
Great, I agree with Will. Also can this ticket please add the "oldest active transaction timestamp" (from |
| Comment by Pavithra Vetriselvan [ 19/Oct/18 ] |
|
I agree with Will that it'd be nice to keep the naming consistent between 4.0 and 4.2. So would mean that the existing fields (currentActive, currentOpen, etc) would encompass prepared and unprepared transactions? |
| Comment by William Schultz (Inactive) [ 19/Oct/18 ] |
|
For sake of consistency between 4.0 and 4.2, I don't think we should change the existing metrics. For example, if someone is using a 4.2 replica set to run non-sharded transactions, I feel that it would be nice if the metrics appear the same as in 4.0 (ignoring any added fields). The definition of totalCommitted can remain the same, and totalPreparedAndThenCommitted will assume the new, appropriate meaning. Like you said, you can derive the value of totalUnpreparedAndThenCommitted from the other two. Alternatively, we could have 3 fields: totalCommitted, totalPreparedAndThenCommitted, totalUnpreparedAndThenCommitted, but that feels a bit overkill. |
| Comment by Judah Schvimer [ 19/Oct/18 ] |
|
pavithra.vetriselvan and jason.chan, do you think we want to change the current metrics to "committed unprepared transactions" etc., or just have readers do subtraction if they care? CC william.schultz kelsey.schubert |
| Comment by Judah Schvimer [ 04/Oct/18 ] |
|
pavithra.vetriselvan, can you please fill the description of this ticket in with what work needs to be done? |