diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-02-27 15:34:43 -0500 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-02-28 11:14:54 -0500 |
commit | 23a23c07c556508e87950cf796183cede9befe83 (patch) | |
tree | 245790ae90970405882cdcbb81ff6a2e8d2a0e71 /src/mongo/db/catalog/rename_collection.h | |
parent | 3ac67d8c605b483398863657abcdffac26aae85e (diff) | |
download | mongo-23a23c07c556508e87950cf796183cede9befe83.tar.gz |
SERVER-33087 Fix the use of dropTarget in renameCollection
Diffstat (limited to 'src/mongo/db/catalog/rename_collection.h')
-rw-r--r-- | src/mongo/db/catalog/rename_collection.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/catalog/rename_collection.h b/src/mongo/db/catalog/rename_collection.h index a744a339fec..83ccfacbc8c 100644 --- a/src/mongo/db/catalog/rename_collection.h +++ b/src/mongo/db/catalog/rename_collection.h @@ -29,6 +29,7 @@ #include "mongo/base/status.h" #include "mongo/bson/bsonelement.h" #include "mongo/bson/bsonobj.h" +#include "mongo/db/catalog/collection_options.h" #include "mongo/util/uuid.h" namespace mongo { @@ -40,12 +41,13 @@ class OpTime; } // namespace repl /** - * Renames the collection "source" to "target" and drops the existing collection named "target" - * iff "dropTarget" is true. "stayTemp" indicates whether a collection should maintain its - * temporariness. + * Renames the collection from "source" to "target" and drops the existing collection with UUID + * dropTargetUUID iff "dropTarget" is true. "stayTemp" indicates whether a collection should + * maintain its temporariness. */ struct RenameCollectionOptions { bool dropTarget = false; + OptionalCollectionUUID dropTargetUUID; bool stayTemp = false; }; Status renameCollection(OperationContext* opCtx, |