From d47bbc343af0b5bbde7b810f63e6b3404ea9e4d6 Mon Sep 17 00:00:00 2001 From: Anton Korshunov Date: Wed, 27 Feb 2019 16:22:31 +0000 Subject: SERVER-24860 Optimize away entire pipeline if it can be answered using a query --- src/mongo/db/commands/write_commands/write_commands.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/commands/write_commands/write_commands.cpp') diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp index 75879251925..f480dda2886 100644 --- a/src/mongo/db/commands/write_commands/write_commands.cpp +++ b/src/mongo/db/commands/write_commands/write_commands.cpp @@ -379,7 +379,8 @@ private: auto exec = uassertStatusOK(getExecutorUpdate( opCtx, &CurOp::get(opCtx)->debug(), collection.getCollection(), &parsedUpdate)); auto bodyBuilder = result->getBodyBuilder(); - Explain::explainStages(exec.get(), collection.getCollection(), verbosity, &bodyBuilder); + Explain::explainStages( + exec.get(), collection.getCollection(), verbosity, BSONObj(), &bodyBuilder); } write_ops::Update _batch; @@ -452,7 +453,8 @@ private: auto exec = uassertStatusOK(getExecutorDelete( opCtx, &CurOp::get(opCtx)->debug(), collection.getCollection(), &parsedDelete)); auto bodyBuilder = result->getBodyBuilder(); - Explain::explainStages(exec.get(), collection.getCollection(), verbosity, &bodyBuilder); + Explain::explainStages( + exec.get(), collection.getCollection(), verbosity, BSONObj(), &bodyBuilder); } write_ops::Delete _batch; -- cgit v1.2.1