diff options
Diffstat (limited to 'src/mongo/dbtests/query_stage_ixscan.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_ixscan.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/dbtests/query_stage_ixscan.cpp b/src/mongo/dbtests/query_stage_ixscan.cpp index 12e8f33fb3c..97f77af78e6 100644 --- a/src/mongo/dbtests/query_stage_ixscan.cpp +++ b/src/mongo/dbtests/query_stage_ixscan.cpp @@ -34,6 +34,7 @@ #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 { @@ -41,7 +42,8 @@ namespace QueryStageIxscan { class IndexScanTest { public: IndexScanTest() - : _scopedXact(&_txn, MODE_IX), + : _txn(), + _scopedXact(&_txn, MODE_IX), _dbLock(_txn.lockState(), nsToDatabaseSubstring(ns()), MODE_X), _ctx(&_txn, ns()), _coll(NULL) {} @@ -137,8 +139,7 @@ public: } protected: - const ServiceContext::UniqueOperationContext _txnPtr = cc().makeOperationContext(); - OperationContext& _txn = *_txnPtr; + OperationContextImpl _txn; ScopedTransaction _scopedXact; Lock::DBLock _dbLock; |