diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-07-31 15:26:11 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-07 13:32:12 +0000 |
commit | 9de175fb3776415e7237e6c0af4b76f518adc451 (patch) | |
tree | 56a22e0f57be9937d53deed8f76fdbc2502639c3 /src/mongo/db/pipeline/document_source_geo_near_cursor.h | |
parent | 21d5a8e5bd822e71e5fb8feb2f9e71a7e8cf25f9 (diff) | |
download | mongo-9de175fb3776415e7237e6c0af4b76f518adc451.tar.gz |
SERVER-47885 Added lookupCollectionByXXXForRead interface to the Collection catalog that returns collection as shared_ptr<const Collection>
AutoGetCollectionForRead and AutoGetCollectionForReadCommand now uses this and holds the shared_ptr. They return the collection as const.
Const correct various places to make this possible.
Moved some logic from Collection destructors to deregister from the catalog as they may now be destroyed at a later point.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_geo_near_cursor.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_geo_near_cursor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source_geo_near_cursor.h b/src/mongo/db/pipeline/document_source_geo_near_cursor.h index 084e8b76bbe..f8d3b483914 100644 --- a/src/mongo/db/pipeline/document_source_geo_near_cursor.h +++ b/src/mongo/db/pipeline/document_source_geo_near_cursor.h @@ -60,7 +60,7 @@ public: * nonnegative. */ static boost::intrusive_ptr<DocumentSourceGeoNearCursor> create( - Collection*, + const Collection*, std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>, const boost::intrusive_ptr<ExpressionContext>&, FieldPath distanceField, @@ -70,7 +70,7 @@ public: const char* getSourceName() const final; private: - DocumentSourceGeoNearCursor(Collection*, + DocumentSourceGeoNearCursor(const Collection*, std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>, const boost::intrusive_ptr<ExpressionContext>&, FieldPath distanceField, |