summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/stage_builder_util.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2020-08-27 14:56:52 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-01 16:25:25 +0000
commit996a22c6e70af35cda8045eb8a0e48c92cfc8931 (patch)
tree6526be339211cc27913e8fc011e63b97caa70b49 /src/mongo/db/query/stage_builder_util.cpp
parent3f70a7ed1c4a8c30bcd2f7d30adfe3e018fc13a8 (diff)
downloadmongo-996a22c6e70af35cda8045eb8a0e48c92cfc8931.tar.gz
SERVER-48555 Allow yielding during SBE runtime planning
Diffstat (limited to 'src/mongo/db/query/stage_builder_util.cpp')
-rw-r--r--src/mongo/db/query/stage_builder_util.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/query/stage_builder_util.cpp b/src/mongo/db/query/stage_builder_util.cpp
index 5f7c6c462e3..733675aa0b7 100644
--- a/src/mongo/db/query/stage_builder_util.cpp
+++ b/src/mongo/db/query/stage_builder_util.cpp
@@ -73,6 +73,10 @@ buildSlotBasedExecutableTree(OperationContext* opCtx,
opCtx, collection, cq, solution, sbeYieldPolicy, needsTrialRunProgressTracker);
auto root = builder->build(solution.root.get());
auto data = builder->getPlanStageData();
+
+ // Register this plan to yield according to the configured policy.
+ sbeYieldPolicy->registerPlan(root.get());
+
return {std::move(root), std::move(data)};
}
} // namespace mongo::stage_builder