summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-05-07 17:10:59 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-05-09 15:53:49 -0400
commitdddf68d86a8c12b0e37d8b3ccfdb58623aaba4e3 (patch)
treeb0e0847de6499d318885b122371341698c03d243 /src/mongo/db/curop.cpp
parent19cceceb780ab13104d5a4e44c373472ac5f430d (diff)
downloadmongo-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.cpp40
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 ) {