summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-07-07 03:29:52 -0400
committerEliot Horowitz <eliot@10gen.com>2011-07-07 03:30:19 -0400
commit27d16a2a05862be5f4d9f034048afbb8444b793e (patch)
tree27b7c884d3d284adb93bedec673f0b788993ea70
parent9ff2f6ce50b3caddcee7c43fffd3136e8c354270 (diff)
downloadmongo-27d16a2a05862be5f4d9f034048afbb8444b793e.tar.gz
SERVER-3386 start command timers at right location
-rw-r--r--db/dbcommands.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp
index cf0857a36dc..0cd80fd528f 100644
--- a/db/dbcommands.cpp
+++ b/db/dbcommands.cpp
@@ -1753,6 +1753,7 @@ namespace mongo {
}
if ( cmdObj["help"].trueValue() ) {
+ client.curop()->ensureStarted();
stringstream ss;
ss << "help for: " << c->name << " ";
c->help( ss );
@@ -1777,6 +1778,7 @@ namespace mongo {
if ( c->locktype() == Command::NONE ) {
// we also trust that this won't crash
+ client.curop()->ensureStarted();
string errmsg;
int ok = c->run( dbname , cmdObj , errmsg , result , fromRepl );
if ( ! ok )
@@ -1791,6 +1793,7 @@ namespace mongo {
}
mongolock lk( needWriteLock );
+ client.curop()->ensureStarted();
Client::Context ctx( dbname , dbpath , &lk , c->requiresAuth() );
try {
@@ -1824,7 +1827,6 @@ namespace mongo {
returns true if ran a cmd
*/
bool _runCommands(const char *ns, BSONObj& _cmdobj, BufBuilder &b, BSONObjBuilder& anObjBuilder, bool fromRepl, int queryOptions) {
- cc().curop()->ensureStarted();
string dbname = nsToDatabase( ns );
if( logLevel >= 1 )