jstests/concurrency/fsm_workload_helpers/server_types.js
/**
 * Returns true if the current storage engine supports committed reads.
 *
 * Throws an error if db is connected to a mongos, or if there is no reported storage engine.
 */
Returns true if the current storage engine supports committed reads.
Throws an error if db is connected to a mongos, or if there is no reported storage engine.
Returns true if the current storage engine supports committed reads . Throws an error if db is connected to a mongos or if there is no reported storage engine .
function supportsCommittedReads(db) {
    var status = db.serverStatus();
    assert.commandWorked(status);
    assert(isMongod(db), 'no storage engine is reported when connected to mongos');
    assert.neq(
        'undefined', typeof status.storageEngine, 'missing storage engine info in server status');
    return status.storageEngine.supportsCommittedReads;
}
function supportsCommittedReads ( db ) { var status = db . serverStatus ( ) ; assert . commandWorked ( status ) ; assert ( isMongod ( db ) , 'no storage engine is reported when connected to mongos' ) ; assert . neq ( 'undefined' , typeof status . storageEngine , 'missing storage engine info in server status' ) ; return status . storageEngine . supportsCommittedReads ; }
Returns true if the current storage engine supports committed reads.
Returns true if the current storage engine supports committed reads .