summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/rs_rollback.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/rs_rollback.h')
-rw-r--r--src/mongo/db/repl/rs_rollback.h90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/mongo/db/repl/rs_rollback.h b/src/mongo/db/repl/rs_rollback.h
index 4409d9e0be9..793521393a9 100644
--- a/src/mongo/db/repl/rs_rollback.h
+++ b/src/mongo/db/repl/rs_rollback.h
@@ -37,56 +37,56 @@
namespace mongo {
- class DBClientConnection;
- class NamespaceString;
- class OperationContext;
+class DBClientConnection;
+class NamespaceString;
+class OperationContext;
namespace repl {
- class OplogInterface;
- class OpTime;
- class ReplicationCoordinator;
- class RollbackSource;
+class OplogInterface;
+class OpTime;
+class ReplicationCoordinator;
+class RollbackSource;
- /**
- * Initiates the rollback process.
- * This function assumes the preconditions for undertaking rollback have already been met;
- * we have ops in our oplog that our sync source does not have, and we are not currently
- * PRIMARY.
- * The rollback procedure is:
- * - find the common point between this node and its sync source
- * - undo operations by fetching all documents affected, then replaying
- * the sync source's oplog until we reach the time in the oplog when we fetched the last
- * document.
- * This function can throw std::exception on failures.
- * This function runs a command on the sync source to detect if the sync source rolls back
- * while our rollback is in progress.
- *
- * @param txn Used to read and write from this node's databases
- * @param lastOpTimeWritten The last OpTime applied by the applier
- * @param localOplog reads the oplog on this server.
- * @param rollbackSource interface for sync source:
- * provides oplog; and
- * supports fetching documents and copying collections.
- * @param replCoord Used to track the rollback ID and to change the follower state
- *
- * Failures: Most failures are returned as a status but some failures throw an std::exception.
- */
+/**
+ * Initiates the rollback process.
+ * This function assumes the preconditions for undertaking rollback have already been met;
+ * we have ops in our oplog that our sync source does not have, and we are not currently
+ * PRIMARY.
+ * The rollback procedure is:
+ * - find the common point between this node and its sync source
+ * - undo operations by fetching all documents affected, then replaying
+ * the sync source's oplog until we reach the time in the oplog when we fetched the last
+ * document.
+ * This function can throw std::exception on failures.
+ * This function runs a command on the sync source to detect if the sync source rolls back
+ * while our rollback is in progress.
+ *
+ * @param txn Used to read and write from this node's databases
+ * @param lastOpTimeWritten The last OpTime applied by the applier
+ * @param localOplog reads the oplog on this server.
+ * @param rollbackSource interface for sync source:
+ * provides oplog; and
+ * supports fetching documents and copying collections.
+ * @param replCoord Used to track the rollback ID and to change the follower state
+ *
+ * Failures: Most failures are returned as a status but some failures throw an std::exception.
+ */
- using SleepSecondsFn = stdx::function<void (Seconds)>;
+using SleepSecondsFn = stdx::function<void(Seconds)>;
- Status syncRollback(OperationContext* txn,
- const OpTime& lastOpTimeWritten,
- const OplogInterface& localOplog,
- const RollbackSource& rollbackSource,
- ReplicationCoordinator* replCoord,
- const SleepSecondsFn& sleepSecondsFn);
+Status syncRollback(OperationContext* txn,
+ const OpTime& lastOpTimeWritten,
+ const OplogInterface& localOplog,
+ const RollbackSource& rollbackSource,
+ ReplicationCoordinator* replCoord,
+ const SleepSecondsFn& sleepSecondsFn);
- Status syncRollback(OperationContext* txn,
- const OpTime& lastOpTimeWritten,
- const OplogInterface& localOplog,
- const RollbackSource& rollbackSource,
- ReplicationCoordinator* replCoord);
+Status syncRollback(OperationContext* txn,
+ const OpTime& lastOpTimeWritten,
+ const OplogInterface& localOplog,
+ const RollbackSource& rollbackSource,
+ ReplicationCoordinator* replCoord);
-} // namespace repl
-} // namespace mongo
+} // namespace repl
+} // namespace mongo