diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-04-16 12:24:16 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-04-18 23:44:56 -0400 |
commit | 0ab34aa7b9c3c48ea6cf17888620fca455284d35 (patch) | |
tree | 9d592c0427229b53bdea159617f7de5d3c6ff819 /src/mongo/dbtests/query_stage_ixscan.cpp | |
parent | bdc06761206ac398af04f0a2eb482c4dca49bad8 (diff) | |
download | mongo-0ab34aa7b9c3c48ea6cf17888620fca455284d35.tar.gz |
SERVER-23779 Replace direct instantiation of OperationContextImpl with cc().makeOperationContext().
Also, make OperationContextImpl's constructor private so that it can
only be constructed via a Client.
Diffstat (limited to 'src/mongo/dbtests/query_stage_ixscan.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_ixscan.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/dbtests/query_stage_ixscan.cpp b/src/mongo/dbtests/query_stage_ixscan.cpp index 97f77af78e6..12e8f33fb3c 100644 --- a/src/mongo/dbtests/query_stage_ixscan.cpp +++ b/src/mongo/dbtests/query_stage_ixscan.cpp @@ -34,7 +34,6 @@ #include "mongo/db/exec/working_set.h" #include "mongo/db/jsobj.h" #include "mongo/db/json.h" -#include "mongo/db/operation_context_impl.h" #include "mongo/dbtests/dbtests.h" namespace QueryStageIxscan { @@ -42,8 +41,7 @@ namespace QueryStageIxscan { class IndexScanTest { public: IndexScanTest() - : _txn(), - _scopedXact(&_txn, MODE_IX), + : _scopedXact(&_txn, MODE_IX), _dbLock(_txn.lockState(), nsToDatabaseSubstring(ns()), MODE_X), _ctx(&_txn, ns()), _coll(NULL) {} @@ -139,7 +137,8 @@ public: } protected: - OperationContextImpl _txn; + const ServiceContext::UniqueOperationContext _txnPtr = cc().makeOperationContext(); + OperationContext& _txn = *_txnPtr; ScopedTransaction _scopedXact; Lock::DBLock _dbLock; |