summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_process.h
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-08-07 12:04:10 -0400
committerJudah Schvimer <judah@mongodb.com>2017-08-07 12:04:10 -0400
commit8fa770baf8fac6e71a45f84b48eeb3bae96a8dab (patch)
tree1aa8c05c67c299e2459153f152c69b17457d62af /src/mongo/db/repl/replication_process.h
parentb519114cb9bc72c17c60761cad369f2d8e18f472 (diff)
downloadmongo-8fa770baf8fac6e71a45f84b48eeb3bae96a8dab.tar.gz
SERVER-29893 Rename recovery code and make it accessible to both startup and rollback
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)