diff options
author | Maddie Zechar <mez2113@columbia.edu> | 2023-01-13 15:46:50 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-13 17:42:35 +0000 |
commit | 4a97c2be5fb3dd35290f9924bbd662212b00737b (patch) | |
tree | 6be85eedc2c1d8c8001f73d46885e7a6dbf11988 /src/mongo/db/commands/run_aggregate.cpp | |
parent | d4c7b6f75bbf52ea6a4e6e0c6a850b4207f6556c (diff) | |
download | mongo-4a97c2be5fb3dd35290f9924bbd662212b00737b.tar.gz |
SERVER-71143: rewrite planning time metric to be maintained/stored by CurOp/OpDebug
Diffstat (limited to 'src/mongo/db/commands/run_aggregate.cpp')
-rw-r--r-- | src/mongo/db/commands/run_aggregate.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp index 6118665ef31..1a8ede92757 100644 --- a/src/mongo/db/commands/run_aggregate.cpp +++ b/src/mongo/db/commands/run_aggregate.cpp @@ -630,12 +630,9 @@ std::vector<std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> createLegacyEx // There are separate ExpressionContexts for each exchange pipeline, so make sure to // pass the pipeline's ExpressionContext to the plan executor factory. auto pipelineExpCtx = pipelineIt->getContext(); - auto planningTimeElapsed = pipelineExpCtx->opCtx->getElapsedQueryPlanningTime(); execs.emplace_back( plan_executor_factory::make(std::move(pipelineExpCtx), std::move(pipelineIt), - planningTimeElapsed, /* metric stored in PlanExplainer - via PlanExecutor construction*/ aggregation_request_helper::getResumableScanType( request, liteParsedPipeline.hasChangeStream()))); } @@ -949,7 +946,7 @@ Status runAggregate(OperationContext* opCtx, expCtx->startExpressionCounters(); auto pipeline = Pipeline::parse(request.getPipeline(), expCtx); - opCtx->beginPlanningTimer(); + curOp->beginQueryPlanningTimer(); expCtx->stopExpressionCounters(); if (!request.getAllowDiskUse().value_or(true)) { |