jstests/concurrency/fsm_workload_helpers/check_transaction_server_status_invariants.js
/**
 * serverStatus invariant: all counts are non-negative
 */
serverStatus invariant: all counts are non-negative
serverStatus invariant : all counts are non - negative
function allCountsNonNegative(serverStatusTxnStats) {
    let active = Number(serverStatusTxnStats["currentActive"]);
    let inactive = Number(serverStatusTxnStats["currentInactive"]);
    let committed = Number(serverStatusTxnStats["totalCommitted"]);
    let aborted = Number(serverStatusTxnStats["totalAborted"]);
    let open = Number(serverStatusTxnStats["currentOpen"]);
    let started = Number(serverStatusTxnStats["totalStarted"]);
    return (active >= 0) && (inactive >= 0) && (committed >= 0) && (aborted >= 0) && (open >= 0) &&
        (started >= 0);
}
function allCountsNonNegative ( serverStatusTxnStats ) { let active = Number ( serverStatusTxnStats [ "currentActive" ] ) ; let inactive = Number ( serverStatusTxnStats [ "currentInactive" ] ) ; let committed = Number ( serverStatusTxnStats [ "totalCommitted" ] ) ; let aborted = Number ( serverStatusTxnStats [ "totalAborted" ] ) ; let open = Number ( serverStatusTxnStats [ "currentOpen" ] ) ; let started = Number ( serverStatusTxnStats [ "totalStarted" ] ) ; return ( active >= 0 ) && ( inactive >= 0 ) && ( committed >= 0 ) && ( aborted >= 0 ) && ( open >= 0 ) && ( started >= 0 ) ; }
serverStatus invariant: all counts are non-negative
serverStatus invariant : all counts are non - negative