diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-28 14:12:40 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-28 14:12:40 -0400 |
commit | e1f5a39b1b625d04752be13f39c774e579b64cd8 (patch) | |
tree | b0211887cf6ff4628c7b783a989dae341caa5d01 /src/mongo/dbtests/repltests.cpp | |
parent | 89fcbab94c7103105e8c72f654a5774a066bdb90 (diff) | |
download | mongo-e1f5a39b1b625d04752be13f39c774e579b64cd8.tar.gz |
SERVER-13961 Add OperationContext argument to Client::Context
Time tracking and database access in Client::Context require access to the
OperationContext. Adding it as argument.
This is in preparation for removing LockState from Client.
Diffstat (limited to 'src/mongo/dbtests/repltests.cpp')
-rw-r--r-- | src/mongo/dbtests/repltests.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp index eb1b45065ad..11338a61225 100644 --- a/src/mongo/dbtests/repltests.cpp +++ b/src/mongo/dbtests/repltests.cpp @@ -65,7 +65,7 @@ namespace ReplTests { public: Base() : _lk(_txn.lockState()), _client(&_txn), - _context(ns()) { + _context(&_txn, ns()) { oldRepl(); replSettings.replSet = ""; @@ -121,7 +121,7 @@ namespace ReplTests { } int count() const { Lock::GlobalWrite lk(_txn.lockState()); - Client::Context ctx( ns() ); + Client::Context ctx(&_txn, ns() ); Database* db = ctx.db(); Collection* coll = db->getCollection( &_txn, ns() ); if ( !coll ) { @@ -140,7 +140,7 @@ namespace ReplTests { static int opCount() { OperationContextImpl txn; Lock::GlobalWrite lk(txn.lockState()); - Client::Context ctx( cllNS() ); + Client::Context ctx(&txn, cllNS() ); Database* db = ctx.db(); Collection* coll = db->getCollection( &txn, cllNS() ); @@ -163,7 +163,7 @@ namespace ReplTests { vector< BSONObj > ops; { - Client::Context ctx( cllNS() ); + Client::Context ctx(&txn, cllNS() ); Database* db = ctx.db(); Collection* coll = db->getCollection( &txn, cllNS() ); @@ -176,7 +176,7 @@ namespace ReplTests { delete it; } { - Client::Context ctx( ns() ); + Client::Context ctx(&txn, ns() ); BSONObjBuilder b; b.append("host", "localhost"); b.appendTimestamp("syncedTo", 0); @@ -192,7 +192,7 @@ namespace ReplTests { static void printAll( const char *ns ) { OperationContextImpl txn; Lock::GlobalWrite lk(txn.lockState()); - Client::Context ctx( ns ); + Client::Context ctx(&txn, ns ); Database* db = ctx.db(); Collection* coll = db->getCollection( &txn, ns ); @@ -213,7 +213,7 @@ namespace ReplTests { static void deleteAll( const char *ns ) { OperationContextImpl txn; Lock::GlobalWrite lk(txn.lockState()); - Client::Context ctx( ns ); + Client::Context ctx(&txn, ns ); Database* db = ctx.db(); Collection* coll = db->getCollection( &txn, ns ); @@ -235,7 +235,7 @@ namespace ReplTests { static void insert( const BSONObj &o ) { OperationContextImpl txn; Lock::GlobalWrite lk(txn.lockState()); - Client::Context ctx( ns() ); + Client::Context ctx(&txn, ns() ); Database* db = ctx.db(); Collection* coll = db->getCollection( &txn, ns() ); |