summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_entry.h
diff options
context:
space:
mode:
authorMatt Kneiser <matt.kneiser@mongodb.com>2023-03-02 15:57:10 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-02 19:33:21 +0000
commitcd29ac28a87681905b2a47f1378661bba0a96275 (patch)
treee4bb4655dc202de5134c0c542e6a3c4b4d362e5d /src/mongo/db/repl/oplog_entry.h
parentcc502c1fa9de00c5ba3c97eb7d2337d288f7dd2a (diff)
downloadmongo-cd29ac28a87681905b2a47f1378661bba0a96275.tar.gz
SERVER-74117 Factor out remaining DDL references to TransactionOperations in OpObserverImpl
Diffstat (limited to 'src/mongo/db/repl/oplog_entry.h')
-rw-r--r--src/mongo/db/repl/oplog_entry.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mongo/db/repl/oplog_entry.h b/src/mongo/db/repl/oplog_entry.h
index 22a5ac499fb..64b40477283 100644
--- a/src/mongo/db/repl/oplog_entry.h
+++ b/src/mongo/db/repl/oplog_entry.h
@@ -262,14 +262,18 @@ public:
static ReplOperation makeDeleteOperation(const NamespaceString& nss,
UUID uuid,
const BSONObj& docToDelete);
- static ReplOperation makeInsertGlobalIndexKeyOperation(const NamespaceString& indexNss,
- UUID indexUuid,
- const BSONObj& key,
- const BSONObj& docKey);
- static ReplOperation makeDeleteGlobalIndexKeyOperation(const NamespaceString& indexNss,
- UUID indexUuid,
- const BSONObj& key,
- const BSONObj& docKey);
+
+ // Returns a MutableOplogEntry that is intended to be equivalent to a ReplOperation.
+ // Importantly, this MutableOplogEntry is not serializable to BSON because
+ // it does not include a WallClockTime. This MutableOplogEntry is intended for
+ // construction before logOperation() which will insert a WallClockTime.
+ // Test code that needs a BSONObj can convert this using something like
+ // MutableOplogEntry::toReplOperation().
+ static MutableOplogEntry makeGlobalIndexCrudOperation(const OpTypeEnum& opType,
+ const NamespaceString& indexNss,
+ const UUID& indexUuid,
+ const BSONObj& key,
+ const BSONObj& docKey);
static ReplOperation makeCreateCommand(NamespaceString nss,
const mongo::CollectionOptions& options,
@@ -481,9 +485,8 @@ public:
using MutableOplogEntry::getOpTime;
using MutableOplogEntry::makeCreateCommand;
using MutableOplogEntry::makeCreateIndexesCommand;
- using MutableOplogEntry::makeDeleteGlobalIndexKeyOperation;
using MutableOplogEntry::makeDeleteOperation;
- using MutableOplogEntry::makeInsertGlobalIndexKeyOperation;
+ using MutableOplogEntry::makeGlobalIndexCrudOperation;
using MutableOplogEntry::makeInsertOperation;
using MutableOplogEntry::makeUpdateOperation;