Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35793

Write concurrency test to verify server-wide transactions metrics tracking

    • Fully Compatible
    • v4.0
    • Repl 2018-08-27, Repl 2018-09-10

      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:

      • currentOpen
      • currentActive
      • currentInactive
      • totalStarted
      • totalCommitted
      • totalAborted

      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.

            Assignee:
            william.schultz@mongodb.com Will Schultz
            Reporter:
            william.schultz@mongodb.com Will Schultz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: