summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/map_reduce_agg.cpp
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2020-03-03 15:26:40 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-13 21:11:41 +0000
commit5388b23cb85e84eb4ce5a2c03b250e62ff89ea1f (patch)
tree5f607e0c9b5e8bd333ffdfc600abfbea5e99b32b /src/mongo/db/commands/map_reduce_agg.cpp
parentc58d35e8b8cd53875a4296e5e70070e2667194d9 (diff)
downloadmongo-5388b23cb85e84eb4ce5a2c03b250e62ff89ea1f.tar.gz
SERVER-46921 make collection of timing info opt in in PlanStage
Diffstat (limited to 'src/mongo/db/commands/map_reduce_agg.cpp')
-rw-r--r--src/mongo/db/commands/map_reduce_agg.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/commands/map_reduce_agg.cpp b/src/mongo/db/commands/map_reduce_agg.cpp
index 4f29ccdb627..4535e0d8abd 100644
--- a/src/mongo/db/commands/map_reduce_agg.cpp
+++ b/src/mongo/db/commands/map_reduce_agg.cpp
@@ -96,7 +96,9 @@ auto makeExpressionContext(OperationContext* opCtx,
std::move(resolvedCollator),
MongoProcessInterface::create(opCtx),
StringMap<ExpressionContext::ResolvedNamespace>{}, // resolvedNamespaces
- uuid);
+ uuid,
+ CurOp::get(opCtx)->dbProfileLevel() > 0 // mayDbProfile
+ );
expCtx->tempDir = storageGlobalParams.dbpath + "/_tmp";
return expCtx;
}