summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_entry.h
diff options
context:
space:
mode:
authorMaria van Keulen <maria.vankeulen@mongodb.com>2020-02-03 22:59:48 +0000
committerevergreen <evergreen@mongodb.com>2020-02-03 22:59:48 +0000
commit860b5fdf681581e211d3be50bfc67007c81530a9 (patch)
treed0eb32409fa3f7b2a914fc329f54dec543f01b58 /src/mongo/db/repl/oplog_entry.h
parented503cddf0373690415447b9fc2fc8812a070960 (diff)
downloadmongo-860b5fdf681581e211d3be50bfc67007c81530a9.tar.gz
SERVER-44849 Allow new index creation inside multi-document transactions
New index creation is permissible inside of a multi-document transaction if the collection on which the index is created does not predate the start of the transaction and is empty.
Diffstat (limited to 'src/mongo/db/repl/oplog_entry.h')
-rw-r--r--src/mongo/db/repl/oplog_entry.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/repl/oplog_entry.h b/src/mongo/db/repl/oplog_entry.h
index 4181a30c1ad..970627810ae 100644
--- a/src/mongo/db/repl/oplog_entry.h
+++ b/src/mongo/db/repl/oplog_entry.h
@@ -95,6 +95,10 @@ public:
const mongo::CollectionOptions& options,
const BSONObj& idIndex);
+ static ReplOperation makeCreateIndexesCommand(const NamespaceString nss,
+ CollectionUUID uuid,
+ const BSONObj& indexDoc);
+
static BSONObj makeCreateCollCmdObj(const NamespaceString& collectionName,
const mongo::CollectionOptions& options,
const BSONObj& idIndex);
@@ -223,6 +227,7 @@ public:
// Make helper functions accessible.
using MutableOplogEntry::getOpTime;
using MutableOplogEntry::makeCreateCommand;
+ using MutableOplogEntry::makeCreateIndexesCommand;
using MutableOplogEntry::makeDeleteOperation;
using MutableOplogEntry::makeInsertOperation;
using MutableOplogEntry::makeUpdateOperation;