summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_collscan.cpp
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2020-08-14 10:23:04 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-02 23:53:39 +0000
commitbf5914a20b596ba3bde772b42e579e028f733bac (patch)
tree2b26469571786d9adb5e95c47990c2416bfab9c4 /src/mongo/dbtests/query_stage_collscan.cpp
parent6b3e341703b781bb1ff7b1263406a0f1d28dd77c (diff)
downloadmongo-bf5914a20b596ba3bde772b42e579e028f733bac.tar.gz
SERVER-50317 Const correct uses of Collection
Most of the code should only need a const Collection now. AutoGetCollection returns a const Collection by default. There is a placeholder getWritableCollection() interface that will handle the necessary steps we need for lock free reads in the future. Added some operators to AutoGetCollection so it behaves more like a smart pointer.
Diffstat (limited to 'src/mongo/dbtests/query_stage_collscan.cpp')
-rw-r--r--src/mongo/dbtests/query_stage_collscan.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/dbtests/query_stage_collscan.cpp b/src/mongo/dbtests/query_stage_collscan.cpp
index 275f13f5158..e765f7473a7 100644
--- a/src/mongo/dbtests/query_stage_collscan.cpp
+++ b/src/mongo/dbtests/query_stage_collscan.cpp
@@ -247,7 +247,7 @@ TEST_F(QueryStageCollectionScanTest, QueryStageCollscanObjectsInOrderBackward) {
TEST_F(QueryStageCollectionScanTest, QueryStageCollscanDeleteUpcomingObject) {
dbtests::WriteContextForTests ctx(&_opCtx, nss.ns());
- Collection* coll = ctx.getCollection();
+ const Collection* coll = ctx.getCollection();
// Get the RecordIds that would be returned by an in-order scan.
vector<RecordId> recordIds;
@@ -300,7 +300,7 @@ TEST_F(QueryStageCollectionScanTest, QueryStageCollscanDeleteUpcomingObject) {
// object we would have gotten after that. But, do it in reverse!
TEST_F(QueryStageCollectionScanTest, QueryStageCollscanDeleteUpcomingObjectBackward) {
dbtests::WriteContextForTests ctx(&_opCtx, nss.ns());
- Collection* coll = ctx.getCollection();
+ const Collection* coll = ctx.getCollection();
// Get the RecordIds that would be returned by an in-order scan.
vector<RecordId> recordIds;