summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-12-30 12:13:05 -0500
committerEliot Horowitz <eliot@10gen.com>2009-12-30 12:13:05 -0500
commitcdda7a23e4901e4074b4a13bfc1c5e1da3d9d367 (patch)
tree48888c59fbbfb71f4da5aefa6fa775a1e5e518b7
parent13533a68a80a78ef9a6a4a2b4b1940380cc3ca8b (diff)
downloadmongo-cdda7a23e4901e4074b4a13bfc1c5e1da3d9d367.tar.gz
slighly ugly handling of nester CurOp
-rw-r--r--db/instance.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/db/instance.cpp b/db/instance.cpp
index 5a81f558b88..ff9a9b54c99 100644
--- a/db/instance.cpp
+++ b/db/instance.cpp
@@ -254,8 +254,14 @@ namespace mongo {
Client& c = cc();
c.clearns();
-
- CurOp& currentOp = *c.curop();
+
+ auto_ptr<CurOp> nestedOp;
+ CurOp* currentOpP = c.curop();
+ if ( currentOpP->active() ){
+ nestedOp.reset( new CurOp() );
+ currentOpP = nestedOp.get();
+ }
+ CurOp& currentOp = *currentOpP;
currentOp.reset(client);
currentOp.setOp(op);