summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_process.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/replication_process.h')
-rw-r--r--src/mongo/db/repl/replication_process.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_process.h b/src/mongo/db/repl/replication_process.h
index da4a2886c6a..5b6229ac6d0 100644
--- a/src/mongo/db/repl/replication_process.h
+++ b/src/mongo/db/repl/replication_process.h
@@ -37,6 +37,7 @@
#include "mongo/db/namespace_string.h"
#include "mongo/db/repl/optime.h"
#include "mongo/db/repl/replication_consistency_markers.h"
+#include "mongo/db/repl/replication_recovery.h"
#include "mongo/stdx/mutex.h"
namespace mongo {
@@ -81,7 +82,8 @@ public:
static void set(ServiceContext* service, std::unique_ptr<ReplicationProcess> process);
ReplicationProcess(StorageInterface* storageInterface,
- std::unique_ptr<ReplicationConsistencyMarkers> consistencyMarkers);
+ std::unique_ptr<ReplicationConsistencyMarkers> consistencyMarkers,
+ std::unique_ptr<ReplicationRecovery> recovery);
virtual ~ReplicationProcess() = default;
/**
@@ -134,6 +136,11 @@ public:
*/
ReplicationConsistencyMarkers* getConsistencyMarkers();
+ /**
+ * Returns an object used to recover from the oplog on startup or rollback.
+ */
+ ReplicationRecovery* getReplicationRecovery();
+
private:
// All member variables are labeled with one of the following codes indicating the
// synchronization rules for accessing them.
@@ -151,6 +158,8 @@ private:
// Used for operations on documents that maintain replication consistency.
std::unique_ptr<ReplicationConsistencyMarkers> _consistencyMarkers; // (S)
+ std::unique_ptr<ReplicationRecovery> _recovery; // (S)
+
// Rollback ID. This is a cached copy of the persisted value in the local.system.rollback.id
// collection.
int _rbid; // (M)