diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-05-07 17:10:59 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-05-09 15:53:49 -0400 |
commit | dddf68d86a8c12b0e37d8b3ccfdb58623aaba4e3 (patch) | |
tree | b0e0847de6499d318885b122371341698c03d243 /src/mongo/db/curop.cpp | |
parent | 19cceceb780ab13104d5a4e44c373472ac5f430d (diff) | |
download | mongo-dddf68d86a8c12b0e37d8b3ccfdb58623aaba4e3.tar.gz |
SERVER-13797 Abstract $where processing and remove usages of getContext
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 2ce1bb7326a..97c9c141346 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -33,9 +33,9 @@ #include "mongo/db/curop.h" #include "mongo/db/catalog/database.h" #include "mongo/db/kill_current_op.h" -#include "mongo/db/matcher.h" #include "mongo/util/fail_point_service.h" + namespace mongo { // Enabling the maxTimeAlwaysTimeOut fail point will cause any query or command run with a valid @@ -97,44 +97,6 @@ namespace mongo { _active = true; // this should be last for ui clarity } - CurOp* CurOp::getOp(const BSONObj& criteria) { - // Regarding Matcher: This is not quite the right hammer to use here. - // Future: use an actual property of CurOp to flag index builds - // and use that to filter. - // This will probably need refactoring once we change index builds - // to be a real command instead of an insert into system.indexes - Matcher matcher(criteria); - - Client& me = cc(); - - scoped_lock client_lock(Client::clientsMutex); - for (std::set<Client*>::iterator it = Client::clients.begin(); - it != Client::clients.end(); - it++) { - - Client *client = *it; - verify(client); - - CurOp* curop = client->curop(); - if (client == &me || curop == NULL) { - continue; - } - - if ( !curop->active() ) - continue; - - if ( curop->killPendingStrict() ) - continue; - - BSONObj info = curop->description(); - if (matcher.matches(info)) { - return curop; - } - } - - return NULL; - } - void CurOp::reset( const HostAndPort& remote, int op ) { reset(); if( _remote != remote ) { |