summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection_catalog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/collection_catalog.h')
-rw-r--r--src/mongo/db/catalog/collection_catalog.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/collection_catalog.h b/src/mongo/db/catalog/collection_catalog.h
index f38f85c5841..e5d2845a527 100644
--- a/src/mongo/db/catalog/collection_catalog.h
+++ b/src/mongo/db/catalog/collection_catalog.h
@@ -38,6 +38,8 @@
#include "mongo/db/database_name.h"
#include "mongo/db/profile_filter.h"
#include "mongo/db/service_context.h"
+// TODO SERVER-68265: remove include.
+#include "mongo/db/storage/durable_catalog.h"
#include "mongo/db/views/view.h"
#include "mongo/stdx/unordered_map.h"
#include "mongo/util/uuid.h"
@@ -206,6 +208,28 @@ public:
Status reloadViews(OperationContext* opCtx, const DatabaseName& dbName) const;
/**
+ * Returns the collection instance representative of 'entry' at the provided read timestamp.
+ *
+ * TODO SERVER-68571:
+ * - If the data files have already been removed, return nullptr.
+ * - Update the drop pending map ident token when not initialized from shared state.
+ *
+ * TODO SERVER-68265:
+ * - Use NamespaceString instead of DurableCatalog::Entry.
+ * - Remove DurableCatalog dependency.
+ *
+ * Returns nullptr when reading from a point-in-time where the collection did not exist.
+ */
+ std::shared_ptr<Collection> openCollection(OperationContext* opCtx,
+ const DurableCatalog::Entry& entry,
+ Timestamp readTimestamp) const;
+
+ /**
+ * Returns a shared_ptr to a drop pending index if it's found and not expired.
+ */
+ std::shared_ptr<IndexCatalogEntry> findDropPendingIndex(const std::string& ident) const;
+
+ /**
* Handles committing a collection to the catalog within a WriteUnitOfWork.
*
* Must be called within a WriteUnitOfWork.