summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2013-01-02 10:41:44 -0500
committerKristina <kristina@10gen.com>2013-01-02 10:44:58 -0500
commite04a7396ea753ea6dbff89028c11ed689868d707 (patch)
tree042038ef3865de5de48df3afd18740f1d1b2c37a /src/mongo/db/curop.cpp
parent43cc1547aaf72146f937d3ae72325807539a4199 (diff)
downloadmongo-e04a7396ea753ea6dbff89028c11ed689868d707.tar.gz
SERVER-2771 Revert command handling
This reverts commit e733331c7edb8871ba2dc58f20fbd2f40bf3adda. This reverts commit ccf86a0fdbe7f9c9a45e8fad0410a7eef777fea2. This reverts commit 7962e49b40c2bf344187df4c6fdd857c2255d759. This reverts commit c5e5e6b9c0d9609234afd1390984d08f6055801b. This reverts commit 325ec6e4d66dfdc075b47a804314eec8f7ea3eb2. This reverts commit 283fc0d291c196232cebc8b964178037aa71f943. This reverts commit 2f21426abe2d75487c91fb361154261969d303cd.
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r--src/mongo/db/curop.cpp54
1 files changed, 11 insertions, 43 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index eab765b398c..c815f7b5623 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -26,9 +26,9 @@ namespace mongo {
// todo : move more here
- CurOp::CurOp( Client * client , CurOp * wrapped ) :
- _client(client),
- _wrapped(wrapped)
+ CurOp::CurOp( Client * client , CurOp * wrapped ) :
+ _client(client),
+ _wrapped(wrapped)
{
if ( _wrapped )
_client->_curOp = this;
@@ -67,38 +67,6 @@ namespace mongo {
_active = true; // this should be last for ui clarity
}
- CurOp* CurOp::getOp(const BSONObj& criteria) {
- 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->info();
- if (matcher.matches(info)) {
- return curop;
- }
- }
-
- return NULL;
- }
-
void CurOp::reset( const HostAndPort& remote, int op ) {
reset();
if( _remote != remote ) {
@@ -107,7 +75,7 @@ namespace mongo {
}
_op = op;
}
-
+
ProgressMeter& CurOp::setMessage(const char * msg,
std::string name,
unsigned long long progressMeterTotal,
@@ -150,7 +118,7 @@ namespace mongo {
_dbprofile = std::max( context->_db ? context->_db->getProfilingLevel() : 0 , _dbprofile );
}
-
+
void CurOp::leave( Client::Context * context ) {
}
@@ -189,13 +157,13 @@ namespace mongo {
if ( _client ) {
b.append( "desc" , _client->desc() );
- if ( _client->_threadId.size() )
+ if ( _client->_threadId.size() )
b.append( "threadId" , _client->_threadId );
if ( _client->_connectionId )
b.appendNumber( "connectionId" , _client->_connectionId );
_client->_ls.reportState(b);
}
-
+
if ( ! _message.empty() ) {
if ( _progressMeter.isActive() ) {
StringBuilder buf;
@@ -211,9 +179,9 @@ namespace mongo {
}
}
- if( killPending() )
+ if( killPending() )
b.append("killPending", true);
-
+
b.append( "numYields" , _numYields );
b.append( "lockStats" , _lockStat.report() );
@@ -221,12 +189,12 @@ namespace mongo {
}
void CurOp::setKillWaiterFlags() {
- for (size_t i = 0; i < _notifyList.size(); ++i)
+ for (size_t i = 0; i < _notifyList.size(); ++i)
*(_notifyList[i]) = true;
_notifyList.clear();
}
- void CurOp::kill(bool* pNotifyFlag /* = NULL */) {
+ void CurOp::kill(bool* pNotifyFlag /* = NULL */) {
_killPending.store(1);
if (pNotifyFlag) {
_notifyList.push_back(pNotifyFlag);