diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-10-10 21:10:05 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-10-24 20:19:20 -0400 |
commit | 248601a6473fc7364e5d790a357acbace2a42f7a (patch) | |
tree | ca3b954d14757df9c41802038ff9086c6ab66037 /src/mongo/db/repl/do_txn_test.cpp | |
parent | 887cc3f6db2a15d94e8ae2195d8183f16337d926 (diff) | |
download | mongo-248601a6473fc7364e5d790a357acbace2a42f7a.tar.gz |
SERVER-37179 Pass the reference of OperationSessionInfoFromClient around.
Diffstat (limited to 'src/mongo/db/repl/do_txn_test.cpp')
-rw-r--r-- | src/mongo/db/repl/do_txn_test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/repl/do_txn_test.cpp b/src/mongo/db/repl/do_txn_test.cpp index 6bcfffa897e..59c997aa4e0 100644 --- a/src/mongo/db/repl/do_txn_test.cpp +++ b/src/mongo/db/repl/do_txn_test.cpp @@ -156,7 +156,10 @@ void DoTxnTest::setUp() { // Set up the transaction and session. _opCtx->setLogicalSessionId(makeLogicalSessionIdForTest()); _opCtx->setTxnNumber(0); // TxnNumber can always be 0 because we have a new session. - _ocs.emplace(_opCtx.get(), true /* checkOutSession */, false, true); + OperationSessionInfoFromClient sessionInfo; + sessionInfo.setAutocommit(false); + sessionInfo.setStartTransaction(true); + _ocs.emplace(_opCtx.get(), true /* checkOutSession */, sessionInfo); auto txnParticipant = TransactionParticipant::get(opCtx()); txnParticipant->unstashTransactionResources(opCtx(), "doTxn"); |