diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-05-20 13:38:36 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-05-22 16:49:24 -0400 |
commit | 765616c3dee87c963d57f8f80d68b4b06ef5f679 (patch) | |
tree | b4c116651c354e37da095502d1d9679f43f65f3a /src/mongo/db/service_context_d.cpp | |
parent | 222ab1639e6782100a006aec49953a454df766d1 (diff) | |
download | mongo-765616c3dee87c963d57f8f80d68b4b06ef5f679.tar.gz |
SERVER-18277 Prefer getting CurOp via the OperationContext rather than the Client.
Eventually, the CurOp should be a part of the OperationContext. Presently, the only
thing that prevents our maintaining that illusion is that ServiceContextMongoD
expects to be able to extract the CurOp for each existing Client object, but there
is no way to enumerate the OperationContexts for a Client.
Diffstat (limited to 'src/mongo/db/service_context_d.cpp')
-rw-r--r-- | src/mongo/db/service_context_d.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/service_context_d.cpp b/src/mongo/db/service_context_d.cpp index d78cf0be802..83427b0cef2 100644 --- a/src/mongo/db/service_context_d.cpp +++ b/src/mongo/db/service_context_d.cpp @@ -189,12 +189,12 @@ namespace mongo { bool ServiceContextMongoD::_killOperationsAssociatedWithClientAndOpId_inlock( Client* client, unsigned int opId) { - for( CurOp *k = CurOp::get(client); k; k = k->parent() ) { + for( CurOp *k = CurOp::getFromClient(client); k; k = k->parent() ) { if ( k->opNum() != opId ) continue; k->kill(); - for( CurOp *l = CurOp::get(client); l; l = l->parent() ) { + for( CurOp *l = CurOp::getFromClient(client); l; l = l->parent() ) { l->kill(); } @@ -229,15 +229,15 @@ namespace mongo { continue; } - if (CurOp::get(client)->opNum() == txn->getOpID()) { + if (CurOp::getFromClient(client)->opNum() == txn->getOpID()) { // Don't kill ourself. continue; } bool found = _killOperationsAssociatedWithClientAndOpId_inlock( - client, CurOp::get(client)->opNum()); + client, CurOp::getFromClient(client)->opNum()); if (!found) { - warning() << "Attempted to kill operation " << CurOp::get(client)->opNum() + warning() << "Attempted to kill operation " << CurOp::getFromClient(client)->opNum() << " but the opId changed"; } } |