summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/drop_collection.h
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2020-02-19 13:56:28 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-19 20:39:41 +0000
commit95335e138106df460056105e2cf0bec08e45708e (patch)
tree00f85fb4b651866c74017a3edbdb2a0cfdb1cc70 /src/mongo/db/catalog/drop_collection.h
parent37b61a5057dee96f7d0db0b592dd084b459b7824 (diff)
downloadmongo-95335e138106df460056105e2cf0bec08e45708e.tar.gz
SERVER-46122 Make the drop command abort in-progress index builds before dropping the ready indexes and collection itself
Diffstat (limited to 'src/mongo/db/catalog/drop_collection.h')
-rw-r--r--src/mongo/db/catalog/drop_collection.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/mongo/db/catalog/drop_collection.h b/src/mongo/db/catalog/drop_collection.h
index 2646c632aa1..5446bbef922 100644
--- a/src/mongo/db/catalog/drop_collection.h
+++ b/src/mongo/db/catalog/drop_collection.h
@@ -38,21 +38,28 @@ namespace repl {
class OpTime;
} // namespace repl
-/**
- * Drops the collection "collectionName" and populates "result" with statistics about what
- * was removed.
- *
- * If we are applying an oplog entry for a collection drop on a secondary, 'dropOpTime' is set
- * to the optime in the oplog entry.
- */
enum class DropCollectionSystemCollectionMode {
kDisallowSystemCollectionDrops,
kAllowSystemCollectionDrops
};
+
+/**
+ * Drops the collection "collectionName" and populates "result" with statistics about what
+ * was removed. Aborts in-progress index builds on the collection if two phase index builds are
+ * supported.
+ */
Status dropCollection(OperationContext* opCtx,
const NamespaceString& collectionName,
BSONObjBuilder& result,
- const repl::OpTime& dropOpTime,
DropCollectionSystemCollectionMode systemCollectionMode);
+/**
+ * Drops the collection "collectionName". When applying a 'drop' oplog entry on a secondary, the
+ * 'dropOpTime' will contain the optime of the oplog entry.
+ */
+Status dropCollectionForApplyOps(OperationContext* opCtx,
+ const NamespaceString& collectionName,
+ const repl::OpTime& dropOpTime,
+ DropCollectionSystemCollectionMode systemCollectionMode);
+
} // namespace mongo