summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/capped_callback.h
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2020-07-31 15:26:11 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-07 13:32:12 +0000
commit9de175fb3776415e7237e6c0af4b76f518adc451 (patch)
tree56a22e0f57be9937d53deed8f76fdbc2502639c3 /src/mongo/db/storage/capped_callback.h
parent21d5a8e5bd822e71e5fb8feb2f9e71a7e8cf25f9 (diff)
downloadmongo-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/storage/capped_callback.h')
-rw-r--r--src/mongo/db/storage/capped_callback.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/storage/capped_callback.h b/src/mongo/db/storage/capped_callback.h
index cced6f61f5d..96a6e33aa29 100644
--- a/src/mongo/db/storage/capped_callback.h
+++ b/src/mongo/db/storage/capped_callback.h
@@ -56,11 +56,11 @@ public:
/**
* Returns true if there may be waiters.
*/
- virtual bool haveCappedWaiters() = 0;
+ virtual bool haveCappedWaiters() const = 0;
/**
* Used to notify any waiters when new documents may be visible in the capped collection.
*/
- virtual void notifyCappedWaitersIfNeeded() = 0;
+ virtual void notifyCappedWaitersIfNeeded() const = 0;
};
} // namespace mongo