jstests/replsets/libs/tenant_migration_test.js
/**
     * Creates a ReplSetTest instance. The repl set will have 2 nodes if not otherwise specified.
     */
Creates a ReplSetTest instance. The repl set will have 2 nodes if not otherwise specified.
Creates a ReplSetTest instance . The repl set will have 2 nodes if not otherwise specified .
function performSetUp(isDonor) {
        if (TestData.logComponentVerbosity) {
            setParameterOpts["logComponentVerbosity"] =
                tojsononeline(TestData.logComponentVerbosity);
        }
        if (!(isDonor || enableRecipientTesting)) {
            setParameterOpts["failpoint.returnResponseOkForRecipientSyncDataCmd"] =
                tojson({mode: 'alwaysOn'});
        }
        if (allowStaleReadsOnDonor) {
            setParameterOpts["failpoint.tenantMigrationDonorAllowsNonTimestampedReads"] =
                tojson({mode: 'alwaysOn'});
        }
        let nodeOptions = isDonor ? migrationX509Options.donor : migrationX509Options.recipient;
        nodeOptions["setParameter"] = setParameterOpts;
        const rstName = `${name}_${(isDonor ? "donor" : "recipient")}`;
        const rst = new ReplSetTest({name: rstName, nodes, nodeOptions});
        rst.startSet();
        if (initiateRstWithHighElectionTimeout) {
            rst.initiateWithHighElectionTimeout();
        } else {
            rst.initiate();
        }
        return rst;
    }
function performSetUp ( isDonor ) { if ( TestData . logComponentVerbosity ) { setParameterOpts [ "logComponentVerbosity" ] = tojsononeline ( TestData . logComponentVerbosity ) ; } if ( ! ( isDonor || enableRecipientTesting ) ) { setParameterOpts [ "failpoint.returnResponseOkForRecipientSyncDataCmd" ] = tojson ( { mode : 'alwaysOn' } ) ; } if ( allowStaleReadsOnDonor ) { setParameterOpts [ "failpoint.tenantMigrationDonorAllowsNonTimestampedReads" ] = tojson ( { mode : 'alwaysOn' } ) ; } let nodeOptions = isDonor ? migrationX509Options . donor : migrationX509Options . recipient ; nodeOptions [ "setParameter" ] = setParameterOpts ; const rstName = ` ${ name } ${ ( isDonor ? "donor" : "recipient" ) } ` ; const rst = new ReplSetTest ( { name : rstName , nodes , nodeOptions } ) ; rst . startSet ( ) ; if ( initiateRstWithHighElectionTimeout ) { rst . initiateWithHighElectionTimeout ( ) ; } else { rst . initiate ( ) ; } return rst ; }
Creates a ReplSetTest instance.
Creates a ReplSetTest instance .