summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/storage_interface.h
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-06-15 10:28:51 -0400
committerJudah Schvimer <judah@mongodb.com>2017-06-15 10:28:51 -0400
commitf39cdb6b207f8b2e855b3b89cc060c833bb45372 (patch)
tree9a574e20ef84190056b14927dbdf6aa850e39e9b /src/mongo/db/repl/storage_interface.h
parenta3f13b0939638243ba4e827a258fbe1e126bb1b6 (diff)
downloadmongo-f39cdb6b207f8b2e855b3b89cc060c833bb45372.tar.gz
SERVER-29276 adds renameCollection function to StorageInterface
Diffstat (limited to 'src/mongo/db/repl/storage_interface.h')
-rw-r--r--src/mongo/db/repl/storage_interface.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/repl/storage_interface.h b/src/mongo/db/repl/storage_interface.h
index 630d481660f..ccc5d03001f 100644
--- a/src/mongo/db/repl/storage_interface.h
+++ b/src/mongo/db/repl/storage_interface.h
@@ -141,6 +141,15 @@ public:
virtual Status dropCollection(OperationContext* opCtx, const NamespaceString& nss) = 0;
/**
+ * Renames a collection from the "fromNS" to the "toNS". Fails if the new collection already
+ * exists.
+ */
+ virtual Status renameCollection(OperationContext* opCtx,
+ const NamespaceString& fromNS,
+ const NamespaceString& toNS,
+ bool stayTemp) = 0;
+
+ /**
* Drops all databases except "local".
*/
virtual Status dropReplicatedDatabases(OperationContext* opCtx) = 0;