jstests/concurrency/fsm_workload_helpers/check_transaction_server_status_invariants.js
/**
 * serverStatus invariant: totalCommitted + totalAborted + currentOpen = totalStarted
 */
serverStatus invariant: totalCommitted + totalAborted + currentOpen = totalStarted
serverStatus invariant : totalCommitted + totalAborted + currentOpen = totalStarted
function committedPlusAbortedPlusOpenEqualsStarted(serverStatusTxnStats) {
    let committed = Number(serverStatusTxnStats["totalCommitted"]);
    let aborted = Number(serverStatusTxnStats["totalAborted"]);
    let open = Number(serverStatusTxnStats["currentOpen"]);
    let started = Number(serverStatusTxnStats["totalStarted"]);
    return (committed + aborted + open) === started;
}
function committedPlusAbortedPlusOpenEqualsStarted ( serverStatusTxnStats ) { let committed = Number ( serverStatusTxnStats [ "totalCommitted" ] ) ; let aborted = Number ( serverStatusTxnStats [ "totalAborted" ] ) ; let open = Number ( serverStatusTxnStats [ "currentOpen" ] ) ; let started = Number ( serverStatusTxnStats [ "totalStarted" ] ) ; return ( committed + aborted + open ) === started ; }
serverStatus invariant: totalCommitted + totalAborted + currentOpen = totalStarted
serverStatus invariant : totalCommitted + totalAborted + currentOpen = totalStarted