summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/write_commands/write_commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/write_commands/write_commands.cpp')
-rw-r--r--src/mongo/db/commands/write_commands/write_commands.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp
index ee86ad4be96..7e56675ef3c 100644
--- a/src/mongo/db/commands/write_commands/write_commands.cpp
+++ b/src/mongo/db/commands/write_commands/write_commands.cpp
@@ -178,8 +178,6 @@ Status WriteCmd::explain(OperationContext* txn,
// Get a reference to the singleton batch item (it's the 0th item in the batch).
BatchItemRef batchItem(&request, 0);
- OpDebug* opDebug = &CurOp::get(txn)->debug();
-
if (BatchedCommandRequest::BatchType_Update == _writeType) {
// Create the update request.
UpdateRequest updateRequest(request.getNS());
@@ -194,6 +192,8 @@ Status WriteCmd::explain(OperationContext* txn,
// Explained updates can yield.
updateRequest.setYieldPolicy(PlanExecutor::YIELD_AUTO);
+ OpDebug* debug = &CurOp::get(txn)->debug();
+
ParsedUpdate parsedUpdate(txn, &updateRequest);
Status parseStatus = parsedUpdate.parseRequest();
if (!parseStatus.isOK()) {
@@ -212,7 +212,7 @@ Status WriteCmd::explain(OperationContext* txn,
}
std::unique_ptr<PlanExecutor> exec =
- uassertStatusOK(getExecutorUpdate(txn, opDebug, collection, &parsedUpdate));
+ uassertStatusOK(getExecutorUpdate(txn, collection, &parsedUpdate, debug));
// Explain the plan tree.
Explain::explainStages(exec.get(), verbosity, out);
@@ -248,7 +248,7 @@ Status WriteCmd::explain(OperationContext* txn,
}
std::unique_ptr<PlanExecutor> exec =
- uassertStatusOK(getExecutorDelete(txn, opDebug, collection, &parsedDelete));
+ uassertStatusOK(getExecutorDelete(txn, collection, &parsedDelete));
// Explain the plan tree.
Explain::explainStages(exec.get(), verbosity, out);