jstests/sharding/txn_two_phase_commit_write_concern.js
/*
 * Runs commitTransaction on the mongos in a parallel shell, and asserts that it works.
 */
Runs commitTransaction on the mongos in a parallel shell, and asserts that it works.
Runs commitTransaction on the mongos in a parallel shell and asserts that it works .
function runCommitThroughMongosInParallelShellExpectSuccess(writeConcern) {
    const runCommitExpectSuccessCode = "assert.commandWorked(db.adminCommand({" +
        "commitTransaction: 1," +
        "lsid: " + tojson(lsid) + "," +
        "txnNumber: NumberLong(" + txnNumber + ")," +
        "stmtId: NumberInt(0)," +
        "autocommit: false," +
        "writeConcern: " + tojson(writeConcern) + "}));";
    return startParallelShell(runCommitExpectSuccessCode, st.s.port);
}
function runCommitThroughMongosInParallelShellExpectSuccess ( writeConcern ) { const runCommitExpectSuccessCode = "assert.commandWorked(db.adminCommand({" + "commitTransaction: 1," + "lsid: " + tojson ( lsid ) + "," + "txnNumber: NumberLong(" + txnNumber + ")," + "stmtId: NumberInt(0)," + "autocommit: false," + "writeConcern: " + tojson ( writeConcern ) + "}));" ; return startParallelShell ( runCommitExpectSuccessCode , st . s . port ) ; }
Runs commitTransaction on the mongos in a parallel shell, and asserts that it works.
Runs commitTransaction on the mongos in a parallel shell and asserts that it works .