jstests/libs/override_methods/network_error_and_txn_override.js
// Commits the given transaction. Throws on failure to commit.
Commits the given transaction. Throws on failure to commit.
Commits the given transaction . Throws on failure to commit .
function commitTransaction(conn, lsid, txnNumber) {
    assert(configuredForTxnOverride());
    assert.gte(txnNumber, 0);
    logMsgFull('commitTransaction',
               `Committing transaction ${txnNumber} on session ${tojsononeline(lsid)}`);
    assert.commandWorked(conn.adminCommand({
        commitTransaction: 1,
        autocommit: false,
        lsid: lsid,
        txnNumber: txnNumber,
    }));
    clearOpsList();
}
function commitTransaction ( conn , lsid , txnNumber ) { assert ( configuredForTxnOverride ( ) ) ; assert . gte ( txnNumber , 0 ) ; logMsgFull ( 'commitTransaction' , ` ${ txnNumber } ${ tojsononeline ( lsid ) } ` ) ; assert . commandWorked ( conn . adminCommand ( { commitTransaction : 1 , autocommit : false , lsid : lsid , txnNumber : txnNumber , } ) ) ; clearOpsList ( ) ; }
Commits the given transaction.
Commits the given transaction .
// Running the command on conn will reenter from the top of `runCommandOverride`, retrying // as needed. // We've successfully committed the transaction, so we can forget the ops we've successfully // run.