jstests/replsets/libs/tenant_migration_util.js
/**
     * Runs the donorAbortMigration command with the given migration options and returns the
     * response.
     *
     * If 'retryOnRetryableErrors' is set, this function will retry if the command fails with a
     * retryable error.
     *
     * Only use when it is necessary to run the donorAbortMigration command in its own thread. For
     * all other use cases, please consider the tryAbortMigration() function in the
     * TenantMigrationTest fixture.
     */
Runs the donorAbortMigration command with the given migration options and returns the
response.

If 'retryOnRetryableErrors' is set, this function will retry if the command fails with a
retryable error.

Only use when it is necessary to run the donorAbortMigration command in its own thread. For
all other use cases, please consider the tryAbortMigration() function in the
TenantMigrationTest fixture.
Runs the donorAbortMigration command with the given migration options and returns the response . If ' retryOnRetryableErrors ' is set this function will retry if the command fails with a retryable error . Only use when it is necessary to run the donorAbortMigration command in its own thread . For all other use cases please consider the tryAbortMigration () function in the TenantMigrationTest fixture .
function tryAbortMigrationAsync(migrationOpts, donorRstArgs, retryOnRetryableErrors = false) {
        load("jstests/replsets/libs/tenant_migration_util.js");
        const donorRst = TenantMigrationUtil.createRst(donorRstArgs, retryOnRetryableErrors);
        const cmdObj = {
            donorAbortMigration: 1,
            migrationId: UUID(migrationOpts.migrationIdString),
        };
        return TenantMigrationUtil.runTenantMigrationCommand(
            cmdObj, donorRst, {retryOnRetryableErrors});
    }
function tryAbortMigrationAsync ( migrationOpts , donorRstArgs , retryOnRetryableErrors = false ) { load ( "jstests/replsets/libs/tenant_migration_util.js" ) ; const donorRst = TenantMigrationUtil . createRst ( donorRstArgs , retryOnRetryableErrors ) ; const cmdObj = { donorAbortMigration : 1 , migrationId : UUID ( migrationOpts . migrationIdString ) , } ; return TenantMigrationUtil . runTenantMigrationCommand ( cmdObj , donorRst , { retryOnRetryableErrors } ) ; }
Runs the donorAbortMigration command with the given migration options and returns the
 response.
Runs the donorAbortMigration command with the given migration options and returns the response .