summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-11-14 09:00:30 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-11-16 03:26:19 -0500
commit943b0f7294b1f30483cc9d0fa4e870b00a68465d (patch)
tree8673dae5e032f4abf6aaba537acaf0a88f54bfeb /src/mongo/dbtests
parent72789f5739982af1cbdb1dd4fa181c4924f657b3 (diff)
downloadmongo-943b0f7294b1f30483cc9d0fa4e870b00a68465d.tar.gz
SERVER-37665 Get rid of the 'checkOutSession' parameter of OperationContextSession
This simplifies the behaviour of the class and moves all the check-out decision taking to happen in the only consumer - the endpoint. Also renames OperationContextSessionMongoD to MongoDOperationContextSession in order to be in sync with the naming nomenclature of SessionCatalog and MongoDSessionCatalog.
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r--src/mongo/dbtests/storage_timestamp_tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/dbtests/storage_timestamp_tests.cpp b/src/mongo/dbtests/storage_timestamp_tests.cpp
index 468474393a1..7688df65a5c 100644
--- a/src/mongo/dbtests/storage_timestamp_tests.cpp
+++ b/src/mongo/dbtests/storage_timestamp_tests.cpp
@@ -53,7 +53,6 @@
#include "mongo/db/logical_clock.h"
#include "mongo/db/multi_key_path_tracker.h"
#include "mongo/db/op_observer_registry.h"
-#include "mongo/db/operation_context_session_mongod.h"
#include "mongo/db/repl/apply_ops.h"
#include "mongo/db/repl/drop_pending_collection_reaper.h"
#include "mongo/db/repl/multiapplier.h"
@@ -2498,7 +2497,7 @@ public:
_opCtx->setLogicalSessionId(sessionId);
_opCtx->setTxnNumber(26);
- ocs = std::make_unique<OperationContextSessionMongod>(_opCtx, true);
+ ocs.emplace(_opCtx);
auto txnParticipant = TransactionParticipant::get(_opCtx);
ASSERT(txnParticipant);
@@ -2539,7 +2538,8 @@ protected:
Timestamp presentTs;
Timestamp beforeTxnTs;
Timestamp commitEntryTs;
- std::unique_ptr<OperationContextSessionMongod> ocs;
+
+ boost::optional<MongoDOperationContextSession> ocs;
};
class MultiDocumentTransaction : public MultiDocumentTransactionTest {