From 23a23c07c556508e87950cf796183cede9befe83 Mon Sep 17 00:00:00 2001 From: Xiangyu Yao Date: Tue, 27 Feb 2018 15:34:43 -0500 Subject: SERVER-33087 Fix the use of dropTarget in renameCollection --- src/mongo/db/catalog/rename_collection.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mongo/db/catalog/rename_collection.h') 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, -- cgit v1.2.1