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/db/commands/write_commands | |
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/db/commands/write_commands')
-rw-r--r-- | src/mongo/db/commands/write_commands/batch_executor.cpp | 12 | ||||
-rw-r--r-- | src/mongo/db/commands/write_commands/write_commands.cpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/commands/write_commands/batch_executor.cpp b/src/mongo/db/commands/write_commands/batch_executor.cpp index 13305866af4..ce52fa66ab4 100644 --- a/src/mongo/db/commands/write_commands/batch_executor.cpp +++ b/src/mongo/db/commands/write_commands/batch_executor.cpp @@ -250,7 +250,7 @@ namespace mongo { if ( needToEnforceWC ) { - _txn->getCurOp()->setMessage( "waiting for write concern" ); + CurOp::get(_txn)->setMessage( "waiting for write concern" ); WriteConcernResult res; Status status = waitForWriteConcern( @@ -622,7 +622,7 @@ namespace mongo { } if (currentOp->shouldDBProfile(executionTime)) { - profile(txn, txn->getCurOp()->getOp()); + profile(txn, CurOp::get(txn)->getOp()); } } @@ -993,7 +993,7 @@ namespace mongo { bool intentLock) { if (hasLock()) { // TODO: OldClientContext legacy, needs to be removed - txn->getCurOp()->enter(_context->ns(), + CurOp::get(txn)->enter(_context->ns(), _context->db() ? _context->db()->getProfilingLevel() : 0); return true; } @@ -1102,7 +1102,7 @@ namespace mongo { } catch ( const WriteConflictException& wce ) { state->unlock(); - state->txn->getCurOp()->debug().writeConflicts++; + CurOp::get(state->txn)->debug().writeConflicts++; state->txn->recoveryUnit()->abandonSnapshot(); WriteConflictException::logAndBackoff( attempt++, "insert", @@ -1334,7 +1334,7 @@ namespace mongo { continue; } - OpDebug* debug = &txn->getCurOp()->debug(); + OpDebug* debug = &CurOp::get(txn)->debug(); try { invariant(collection); @@ -1456,7 +1456,7 @@ namespace mongo { break; } catch ( const WriteConflictException& dle ) { - txn->getCurOp()->debug().writeConflicts++; + CurOp::get(txn)->debug().writeConflicts++; WriteConflictException::logAndBackoff( attempt++, "delete", nss.ns() ); } catch (const StaleConfigException& staleExcep) { diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp index a1d217d7525..d28b9c80bba 100644 --- a/src/mongo/db/commands/write_commands/write_commands.cpp +++ b/src/mongo/db/commands/write_commands/write_commands.cpp @@ -212,7 +212,7 @@ namespace mongo { // Explained updates can yield. updateRequest.setYieldPolicy(PlanExecutor::YIELD_AUTO); - OpDebug* debug = &txn->getCurOp()->debug(); + OpDebug* debug = &CurOp::get(txn)->debug(); ParsedUpdate parsedUpdate( txn, &updateRequest ); Status parseStatus = parsedUpdate.parseRequest(); |