diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-11-14 09:00:30 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-11-16 03:26:19 -0500 |
commit | 943b0f7294b1f30483cc9d0fa4e870b00a68465d (patch) | |
tree | 8673dae5e032f4abf6aaba537acaf0a88f54bfeb /src/mongo/db/op_observer_impl_test.cpp | |
parent | 72789f5739982af1cbdb1dd4fa181c4924f657b3 (diff) | |
download | mongo-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/db/op_observer_impl_test.cpp')
-rw-r--r-- | src/mongo/db/op_observer_impl_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/op_observer_impl_test.cpp b/src/mongo/db/op_observer_impl_test.cpp index 0c2501cd6f0..6bfd5a8ec48 100644 --- a/src/mongo/db/op_observer_impl_test.cpp +++ b/src/mongo/db/op_observer_impl_test.cpp @@ -40,7 +40,6 @@ #include "mongo/db/logical_clock.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/op_observer_impl.h" -#include "mongo/db/operation_context_session_mongod.h" #include "mongo/db/repl/oplog.h" #include "mongo/db/repl/oplog_interface_local.h" #include "mongo/db/repl/repl_client_info.h" @@ -540,7 +539,8 @@ public: _times.emplace(opCtx()); opCtx()->setLogicalSessionId(session()->getSessionId()); opCtx()->setTxnNumber(txnNum()); - _sessionCheckout = std::make_unique<OperationContextSessionMongod>(opCtx(), true); + + _sessionCheckout = std::make_unique<MongoDOperationContextSession>(opCtx()); auto txnParticipant = TransactionParticipant::get(opCtx()); txnParticipant->beginOrContinue(*opCtx()->getTxnNumber(), false, true); } @@ -627,7 +627,7 @@ private: boost::optional<ScopedSession> _session; ServiceContext::UniqueOperationContext _opCtx; boost::optional<ExposeOpObserverTimes::ReservedTimes> _times; - std::unique_ptr<OperationContextSessionMongod> _sessionCheckout; + std::unique_ptr<MongoDOperationContextSession> _sessionCheckout; TxnNumber _txnNum = 0; }; |