[SERVER-35793] Write concurrency test to verify server-wide transactions metrics tracking Created: 25/Jun/18 Updated: 29/Oct/23 Resolved: 24/Aug/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.3, 4.1.3 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | William Schultz (Inactive) | Assignee: | William Schultz (Inactive) |
| 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-08-27, Repl 2018-09-10 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
It would be nice to add a basic concurrency test to verify that the various transactions metrics tracked in serverStatus uphold some basic invariants when many transactions are run concurrently. These metrics from the transactions serverStatus section include:
One idea would be to run several threads that each execute their own transaction. We could design the test so that we expect a certain number of write conflicts between transactions, for example. At the end of the test we could verify that the total number of expected commits and aborts is correct, as well as the total number of started transactions. We could also verify that after running many transactions and all finish, currentOpen, currentActive, and currentInactive are all zero. It would also be nice to test that currentActive + currentInactive = currentOpen totalCommitted + totalAborted + currentOpen = totalStarted Some of these invariants may not always hold true due to the way we update certain counters non-atomically. |
| Comments |
| Comment by Githook User [ 28/Aug/18 ] |
|
Author: {'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}Message: (cherry picked from commit f66a67ac3e80f4968506cab34ac35668d65a13e6) |
| Comment by Githook User [ 24/Aug/18 ] |
|
Author: {'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}Message: |