diff options
author | David Storch <david.storch@10gen.com> | 2014-07-15 17:30:02 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2014-07-22 09:24:11 -0400 |
commit | 7ffac7f351b80f84589349e44693a94d5cc5e14c (patch) | |
tree | 3707298920eabe877af03963f3f61f74c5a61fc5 /src/mongo/db/ops/update.cpp | |
parent | fb270d89cbcfdb98c3cee3e631c76ca035c7b4f0 (diff) | |
download | mongo-7ffac7f351b80f84589349e44693a94d5cc5e14c.tar.gz |
SERVER-14407 replace Runner with PlanExecutor
Diffstat (limited to 'src/mongo/db/ops/update.cpp')
-rw-r--r-- | src/mongo/db/ops/update.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/ops/update.cpp b/src/mongo/db/ops/update.cpp index f872f39a97d..4ca1367465c 100644 --- a/src/mongo/db/ops/update.cpp +++ b/src/mongo/db/ops/update.cpp @@ -466,6 +466,9 @@ namespace mongo { // Create the plan executor and setup all deps. auto_ptr<PlanExecutor> exec(rawExec); + // Register executor with the collection cursor cache. + const ScopedExecutorRegistration safety(exec.get()); + // Get the canonical query which the underlying executor is using. This may be NULL in // the case of idhack updates. cq = exec->getCanonicalQuery(); @@ -667,7 +670,7 @@ namespace mongo { // Restore state after modification uassert(17278, "Update could not restore plan executor state after updating a document.", - exec->restoreState()); + exec->restoreState(request.getOpCtx())); // Call logOp if requested. if (request.shouldCallLogOp() && !logObj.isEmpty()) { |