jstests/sharding/txn_two_phase_commit_write_concern.js
/*
 * Runs a transaction to inserts the given docs.
 */
Runs a transaction to inserts the given docs.
Runs a transaction to inserts the given docs .
function runInsertCmdInTxn(docs) {
    assert.commandWorked(st.s.getDB(kDbName).runCommand({
        insert: kCollName,
        documents: docs,
        lsid: lsid,
        txnNumber: NumberLong(txnNumber),
        stmtId: NumberInt(0),
        startTransaction: true,
        autocommit: false,
    }));
}
function runInsertCmdInTxn ( docs ) { assert . commandWorked ( st . s . getDB ( kDbName ) . runCommand ( { insert : kCollName , documents : docs , lsid : lsid , txnNumber : NumberLong ( txnNumber ) , stmtId : NumberInt ( 0 ) , startTransaction : true , autocommit : false , } ) ) ; }
Runs a transaction to inserts the given docs.
Runs a transaction to inserts the given docs .