diff options
author | Ernie Hershey <ernie.hershey@10gen.com> | 2015-05-18 17:23:31 -0400 |
---|---|---|
committer | Ernie Hershey <ernie.hershey@10gen.com> | 2015-05-18 17:23:31 -0400 |
commit | d3fda5afd4f1d65f03e0e3ef01ffb82e4f60ce26 (patch) | |
tree | 831c13c2d1d05930af0db973b1827474cc37f81e /src/mongo/dbtests | |
parent | a3046362af4cb79a714c95783ca66f87f4d5a827 (diff) | |
download | mongo-d3fda5afd4f1d65f03e0e3ef01ffb82e4f60ce26.tar.gz |
Revert "Revert "SERVER-18515 Replace OperationContext::getCurOp with CurOp::get(OperationContext*)""
This reverts commit 7147e127644cba2bfa292945557b43664cc31f47.
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/indexupdatetests.cpp | 18 | ||||
-rw-r--r-- | src/mongo/dbtests/query_stage_update.cpp | 6 | ||||
-rw-r--r-- | src/mongo/dbtests/querytests.cpp | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp index cf01a43a9b1..a9cda7a01b6 100644 --- a/src/mongo/dbtests/indexupdatetests.cpp +++ b/src/mongo/dbtests/indexupdatetests.cpp @@ -175,7 +175,7 @@ namespace IndexUpdateTests { nDocs, nDocs)); // Register a request to kill the current operation. - txn.getCurOp()->kill(); + CurOp::get(txn)->kill(); if ( _mayInterrupt ) { // Add keys to phaseOne. ASSERT_THROWS( BtreeBasedBuilder::addKeysToPhaseOne( collection(), @@ -225,7 +225,7 @@ namespace IndexUpdateTests { phaseOne.sorter->sort( false ); // Set up remaining arguments. set<RecordId> dups; - CurOp* op = txn.getCurOp(); + CurOp* op = CurOp::get(txn); ProgressMeterHolder pm (op->setMessage("BuildBottomUp", "BuildBottomUp Progress", nKeys, @@ -291,7 +291,7 @@ namespace IndexUpdateTests { phaseOne.sorter->sort( false ); // Set up remaining arguments. set<RecordId> dups; - CurOp* op = txn.getCurOp(); + CurOp* op = CurOp::get(txn); ProgressMeterHolder pm (op->setMessage("InterruptBuildBottomUp", "InterruptBuildBottomUp Progress", nKeys, @@ -301,7 +301,7 @@ namespace IndexUpdateTests { // The index's root has not yet been set. ASSERT( id->getHead().isNull() ); // Register a request to kill the current operation. - txn.getCurOp()->kill(); + CurOp::get(txn)->kill(); if ( _mayInterrupt ) { // The build is aborted due to the kill request. ASSERT_THROWS @@ -483,7 +483,7 @@ namespace IndexUpdateTests { wunit.commit(); } // Initialize curop. - _txn.getCurOp()->reset(); + CurOp::get(_txn)->reset(); // Request an interrupt. getGlobalServiceContext()->setKillAllOperations(); BSONObj indexInfo = BSON( "key" << BSON( "a" << 1 ) << "ns" << _ns << "name" << "a_1" ); @@ -516,7 +516,7 @@ namespace IndexUpdateTests { wunit.commit(); } // Initialize curop. - _txn.getCurOp()->reset(); + CurOp::get(_txn)->reset(); // Request an interrupt. getGlobalServiceContext()->setKillAllOperations(); BSONObj indexInfo = BSON( "key" << BSON( "a" << 1 ) << "ns" << _ns << "name" << "a_1" ); @@ -552,7 +552,7 @@ namespace IndexUpdateTests { wunit.commit(); } // Initialize curop. - _txn.getCurOp()->reset(); + CurOp::get(_txn)->reset(); // Request an interrupt. getGlobalServiceContext()->setKillAllOperations(); BSONObj indexInfo = BSON( "key" << BSON( "_id" << 1 ) << @@ -590,7 +590,7 @@ namespace IndexUpdateTests { wunit.commit(); } // Initialize curop. - _txn.getCurOp()->reset(); + CurOp::get(_txn)->reset(); // Request an interrupt. getGlobalServiceContext()->setKillAllOperations(); BSONObj indexInfo = BSON( "key" << BSON( "_id" << 1 ) << @@ -617,7 +617,7 @@ namespace IndexUpdateTests { // Start with just _id ASSERT_EQUALS( 1U, _client.getIndexSpecs(_ns).size()); // Initialize curop. - _txn.getCurOp()->reset(); + CurOp::get(_txn)->reset(); // Request an interrupt. getGlobalServiceContext()->setKillAllOperations(); // The call is not interrupted. diff --git a/src/mongo/dbtests/query_stage_update.cpp b/src/mongo/dbtests/query_stage_update.cpp index 0e800166807..783db28ca8b 100644 --- a/src/mongo/dbtests/query_stage_update.cpp +++ b/src/mongo/dbtests/query_stage_update.cpp @@ -372,7 +372,7 @@ namespace QueryStageUpdate { // Various variables we'll need. OldClientWriteContext ctx(&_txn, ns()); - OpDebug* opDebug = &_txn.getCurOp()->debug(); + OpDebug* opDebug = &CurOp::get(_txn)->debug(); Collection* coll = ctx.getCollection(); UpdateLifecycleImpl updateLifecycle(false, nsString()); UpdateRequest request(nsString()); @@ -459,7 +459,7 @@ namespace QueryStageUpdate { // Various variables we'll need. OldClientWriteContext ctx(&_txn, ns()); - OpDebug* opDebug = &_txn.getCurOp()->debug(); + OpDebug* opDebug = &CurOp::get(_txn)->debug(); Collection* coll = ctx.getCollection(); UpdateLifecycleImpl updateLifecycle(false, nsString()); UpdateRequest request(nsString()); @@ -540,7 +540,7 @@ namespace QueryStageUpdate { void run() { // Various variables we'll need. OldClientWriteContext ctx(&_txn, ns()); - OpDebug* opDebug = &_txn.getCurOp()->debug(); + OpDebug* opDebug = &CurOp::get(_txn)->debug(); Collection* coll = ctx.getCollection(); UpdateLifecycleImpl updateLifecycle(false, nsString()); UpdateRequest request(nsString()); diff --git a/src/mongo/dbtests/querytests.cpp b/src/mongo/dbtests/querytests.cpp index e804fc12e50..bc07e1f9231 100644 --- a/src/mongo/dbtests/querytests.cpp +++ b/src/mongo/dbtests/querytests.cpp @@ -217,7 +217,7 @@ namespace QueryTests { public: ClientBase() : _client(&_txn) { mongo::LastError::get(_txn.getClient()).reset(); - _txn.getCurOp()->reset(); + CurOp::get(_txn)->reset(); } virtual ~ClientBase() { mongo::LastError::get(_txn.getClient()).reset(); |