Permalink
Browse files

SERVER-3386 start command timers at right location

  • Loading branch information...
1 parent 9ff2f6c commit 27d16a2a05862be5f4d9f034048afbb8444b793e @erh erh committed Jul 7, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 db/dbcommands.cpp
View
@@ -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 )

0 comments on commit 27d16a2

Please sign in to comment.