diff options
author | William Schultz <william.schultz@mongodb.com> | 2018-02-21 11:49:25 -0500 |
---|---|---|
committer | William Schultz <william.schultz@mongodb.com> | 2018-02-21 11:53:14 -0500 |
commit | 788369eb773eede21ee0f492363bb7e64054ffd3 (patch) | |
tree | 85e2c2420d5f041ced1a55c68bcd2ae64269a6d0 /src/mongo/db/repl/rollback_test_fixture.h | |
parent | 298dae8fed97e950b2633c32829ccd85bad204f1 (diff) | |
download | mongo-788369eb773eede21ee0f492363bb7e64054ffd3.tar.gz |
SERVER-29933 Add onReplicationRollback OpObserver method
Diffstat (limited to 'src/mongo/db/repl/rollback_test_fixture.h')
-rw-r--r-- | src/mongo/db/repl/rollback_test_fixture.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/db/repl/rollback_test_fixture.h b/src/mongo/db/repl/rollback_test_fixture.h index ac64de6d8a0..932f327914b 100644 --- a/src/mongo/db/repl/rollback_test_fixture.h +++ b/src/mongo/db/repl/rollback_test_fixture.h @@ -29,6 +29,7 @@ #pragma once #include "mongo/db/repl/drop_pending_collection_reaper.h" +#include "mongo/db/repl/oplog_entry.h" #include "mongo/db/repl/oplog_interface.h" #include "mongo/db/repl/oplog_interface_mock.h" #include "mongo/db/repl/replication_coordinator_mock.h" @@ -82,6 +83,18 @@ public: Status _insertOplogEntry(const BSONObj& doc); /** + * Creates an oplog entry with a recordId for a CRUD operation (insert, update, delete). Also + * works for creating a no-op entry. + */ + static std::pair<BSONObj, RecordId> makeCRUDOp(OpTypeEnum opType, + Timestamp ts, + UUID uuid, + StringData nss, + BSONObj o, + boost::optional<BSONObj> o2, + int recordId); + + /** * Creates an oplog entry with a recordId for a command operation. */ static std::pair<BSONObj, RecordId> makeCommandOp( |