jstests/replsets/dbcheck.js
// First check behavior when everything is consistent.
First check behavior when everything is consistent.
First check behavior when everything is consistent .
function simpleTestConsistent() {
    let primary = replSet.getPrimary();
    clearLog();
    assert.neq(primary, undefined);
    let db = primary.getDB(dbName);
    assert.commandWorked(db.runCommand({"dbCheck": multiBatchSimpleCollName}));
    awaitDbCheckCompletion(db, multiBatchSimpleCollName);
    checkLogAllConsistent(primary);
    checkTotalCounts(primary, db[multiBatchSimpleCollName]);
    forEachSecondary(function(secondary) {
        checkLogAllConsistent(secondary);
        checkTotalCounts(secondary, secondary.getDB(dbName)[multiBatchSimpleCollName]);
    });
}
function simpleTestConsistent ( ) { let primary = replSet . getPrimary ( ) ; clearLog ( ) ; assert . neq ( primary , undefined ) ; let db = primary . getDB ( dbName ) ; assert . commandWorked ( db . runCommand ( { "dbCheck" : multiBatchSimpleCollName } ) ) ; awaitDbCheckCompletion ( db , multiBatchSimpleCollName ) ; checkLogAllConsistent ( primary ) ; checkTotalCounts ( primary , db [ multiBatchSimpleCollName ] ) ; forEachSecondary ( function ( secondary ) { checkLogAllConsistent ( secondary ) ; checkTotalCounts ( secondary , secondary . getDB ( dbName ) [ multiBatchSimpleCollName ] ) ; } ) ; }
First check behavior when everything is consistent.
First check behavior when everything is consistent .