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.