summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbhelpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/dbhelpers.cpp')
-rw-r--r--src/mongo/db/dbhelpers.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp
index 9e9c0ada8f9..f6c1c27b4d6 100644
--- a/src/mongo/db/dbhelpers.cpp
+++ b/src/mongo/db/dbhelpers.cpp
@@ -108,8 +108,8 @@ RecordId Helpers::findOne(OperationContext* opCtx,
unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue());
size_t options = requireIndex ? QueryPlannerParams::NO_TABLE_SCAN : QueryPlannerParams::DEFAULT;
- auto exec = uassertStatusOK(
- getExecutor(opCtx, collection, std::move(cq), PlanExecutor::NO_YIELD, options));
+ auto exec = uassertStatusOK(getExecutor(
+ opCtx, collection, std::move(cq), PlanYieldPolicy::YieldPolicy::NO_YIELD, options));
PlanExecutor::ExecState state;
BSONObj obj;
@@ -185,7 +185,8 @@ bool Helpers::getSingleton(OperationContext* opCtx, const char* ns, BSONObj& res
boost::optional<AutoGetOplog> autoOplog;
auto collection = getCollectionForRead(opCtx, NamespaceString(ns), autoColl, autoOplog);
- auto exec = InternalPlanner::collectionScan(opCtx, ns, collection, PlanExecutor::NO_YIELD);
+ auto exec = InternalPlanner::collectionScan(
+ opCtx, ns, collection, PlanYieldPolicy::YieldPolicy::NO_YIELD);
PlanExecutor::ExecState state = exec->getNext(&result, nullptr);
CurOp::get(opCtx)->done();
@@ -207,7 +208,7 @@ bool Helpers::getLast(OperationContext* opCtx, const char* ns, BSONObj& result)
auto collection = getCollectionForRead(opCtx, NamespaceString(ns), autoColl, autoOplog);
auto exec = InternalPlanner::collectionScan(
- opCtx, ns, collection, PlanExecutor::NO_YIELD, InternalPlanner::BACKWARD);
+ opCtx, ns, collection, PlanYieldPolicy::YieldPolicy::NO_YIELD, InternalPlanner::BACKWARD);
PlanExecutor::ExecState state = exec->getNext(&result, nullptr);
// Non-yielding collection scans from InternalPlanner will never error.
@@ -246,7 +247,7 @@ void Helpers::upsert(OperationContext* opCtx,
request.setUpdateModification(updateMod);
request.setUpsert();
request.setFromMigration(fromMigrate);
- request.setYieldPolicy(PlanExecutor::NO_YIELD);
+ request.setYieldPolicy(PlanYieldPolicy::YieldPolicy::NO_YIELD);
update(opCtx, context.db(), request);
}