summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_plan_executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/query_plan_executor.cpp')
-rw-r--r--src/mongo/dbtests/query_plan_executor.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/dbtests/query_plan_executor.cpp b/src/mongo/dbtests/query_plan_executor.cpp
index 075ededc8e9..d0bc883c9d5 100644
--- a/src/mongo/dbtests/query_plan_executor.cpp
+++ b/src/mongo/dbtests/query_plan_executor.cpp
@@ -97,7 +97,7 @@ public:
* capable of executing a simple collection scan.
*/
unique_ptr<PlanExecutor, PlanExecutor::Deleter> makeCollScanExec(
- Collection* coll,
+ const Collection* coll,
BSONObj& filterObj,
PlanYieldPolicy::YieldPolicy yieldPolicy = PlanYieldPolicy::YieldPolicy::YIELD_MANUAL,
TailableModeEnum tailableMode = TailableModeEnum::kNormal) {
@@ -183,7 +183,7 @@ protected:
private:
const IndexDescriptor* getIndex(Database* db, const BSONObj& obj) {
- Collection* collection =
+ const Collection* collection =
CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(&_opCtx, nss);
std::vector<const IndexDescriptor*> indexes;
collection->getIndexCatalog()->findIndexesByKeyPattern(&_opCtx, obj, false, &indexes);
@@ -206,7 +206,7 @@ TEST_F(PlanExecutorTest, DropIndexScanAgg) {
BSONObj indexSpec = BSON("a" << 1);
addIndex(indexSpec);
- Collection* collection = ctx.getCollection();
+ const Collection* collection = ctx.getCollection();
// Create the aggregation pipeline.
std::vector<BSONObj> rawPipeline = {fromjson("{$match: {a: {$gte: 7, $lte: 10}}}")};
@@ -242,7 +242,7 @@ TEST_F(PlanExecutorTest, ShouldReportErrorIfExceedsTimeLimitDuringYield) {
BSONObj filterObj = fromjson("{_id: {$gt: 0}}");
- Collection* coll = ctx.getCollection();
+ const Collection* coll = ctx.getCollection();
auto exec = makeCollScanExec(coll, filterObj, PlanYieldPolicy::YieldPolicy::ALWAYS_TIME_OUT);
BSONObj resultObj;
@@ -259,7 +259,7 @@ TEST_F(PlanExecutorTest, ShouldReportErrorIfKilledDuringYieldButIsTailableAndAwa
BSONObj filterObj = fromjson("{_id: {$gt: 0}}");
- Collection* coll = ctx.getCollection();
+ const Collection* coll = ctx.getCollection();
auto exec = makeCollScanExec(coll,
filterObj,
PlanYieldPolicy::YieldPolicy::ALWAYS_TIME_OUT,
@@ -279,7 +279,7 @@ TEST_F(PlanExecutorTest, ShouldNotSwallowExceedsTimeLimitDuringYieldButIsTailabl
BSONObj filterObj = fromjson("{_id: {$gt: 0}}");
- Collection* coll = ctx.getCollection();
+ const Collection* coll = ctx.getCollection();
auto exec = makeCollScanExec(coll,
filterObj,
PlanYieldPolicy::YieldPolicy::ALWAYS_TIME_OUT,
@@ -299,7 +299,7 @@ TEST_F(PlanExecutorTest, ShouldReportErrorIfKilledDuringYield) {
BSONObj filterObj = fromjson("{_id: {$gt: 0}}");
- Collection* coll = ctx.getCollection();
+ const Collection* coll = ctx.getCollection();
auto exec = makeCollScanExec(coll, filterObj, PlanYieldPolicy::YieldPolicy::ALWAYS_MARK_KILLED);
BSONObj resultObj;
@@ -364,7 +364,7 @@ TEST_F(PlanExecutorSnapshotTest, SnapshotControl) {
BSONObj filterObj = fromjson("{a: {$gte: 2}}");
- Collection* coll = ctx.getCollection();
+ const Collection* coll = ctx.getCollection();
auto exec = makeCollScanExec(coll, filterObj);
BSONObj objOut;