summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/rename_collection.h
diff options
context:
space:
mode:
authorGil Alon <gil.alon@mongodb.com>2023-04-19 20:39:57 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-19 23:48:44 +0000
commitc94c4f3abd0f9c113067e360269301b14363d53e (patch)
tree3b4346402ce3a564f5e65586920e1c4d94affe83 /src/mongo/db/catalog/rename_collection.h
parentf534a8ba34a0ef4c80cd222df28f22e5a62bc284 (diff)
downloadmongo-c94c4f3abd0f9c113067e360269301b14363d53e.tar.gz
SERVER-72687 support $out to time-series collections
Diffstat (limited to 'src/mongo/db/catalog/rename_collection.h')
-rw-r--r--src/mongo/db/catalog/rename_collection.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/rename_collection.h b/src/mongo/db/catalog/rename_collection.h
index 8697b70c2dc..b93e235f52b 100644
--- a/src/mongo/db/catalog/rename_collection.h
+++ b/src/mongo/db/catalog/rename_collection.h
@@ -45,12 +45,14 @@ class OpTime;
/**
* Renames the collection from "source" to "target" and drops the existing collection if
* "dropTarget" is true. "stayTemp" indicates whether a collection should maintain its
- * temporariness.
+ * temporariness. "allowBuckets" indicates whether a time-series buckets collection should be
+ * allowed to be renamed.
*/
struct RenameCollectionOptions {
bool dropTarget = false;
bool stayTemp = false;
bool markFromMigrate = false;
+ bool allowBuckets = false;
boost::optional<UUID> expectedSourceUUID;
boost::optional<UUID> expectedTargetUUID;
};
@@ -93,9 +95,11 @@ Status renameCollectionForRollback(OperationContext* opCtx,
/**
* Performs validation checks to ensure source and target namespaces are eligible for rename.
*/
-void validateNamespacesForRenameCollection(OperationContext* opCtx,
- const NamespaceString& source,
- const NamespaceString& target);
+void validateNamespacesForRenameCollection(
+ OperationContext* opCtx,
+ const NamespaceString& source,
+ const NamespaceString& target,
+ const RenameCollectionOptions& options = RenameCollectionOptions());
/**
* Runs renameCollection() with preliminary validation checks to ensure source