diff options
Diffstat (limited to 'src/mongo/db/repl/rollback_impl.h')
-rw-r--r-- | src/mongo/db/repl/rollback_impl.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/mongo/db/repl/rollback_impl.h b/src/mongo/db/repl/rollback_impl.h index 46f4111ec95..b8a6b5b04cf 100644 --- a/src/mongo/db/repl/rollback_impl.h +++ b/src/mongo/db/repl/rollback_impl.h @@ -95,14 +95,24 @@ public: virtual ~Listener() = default; /** - * Function called after we transition to ROLLBACK. + * Function called after we transition to ROLLBACK. */ - virtual void onTransitionToRollback() {} + virtual void onTransitionToRollback() noexcept {} /** - * Function called after we find the common point. + * Function called after we find the common point. */ - virtual void onCommonPointFound(Timestamp commonPoint) {} + virtual void onCommonPointFound(Timestamp commonPoint) noexcept {} + + /** + * Function called after we recover to the stable timestamp. + */ + virtual void onRecoverToStableTimestamp() noexcept {} + + /** + * Function called after we recover from the oplog. + */ + virtual void onRecoverFromOplog() noexcept {} }; /** @@ -159,6 +169,17 @@ private: Status _transitionToRollback(OperationContext* opCtx); /** + * Recovers to the stable timestamp while holding the global exclusive lock. + */ + Status _recoverToStableTimestamp(OperationContext* opCtx); + + /** + * Runs the oplog recovery logic. This involves applying oplog operations between the stable + * timestamp and the common point. + */ + Status _oplogRecovery(OperationContext* opCtx); + + /** * If we detected that we rolled back the shardIdentity document as part of this rollback * then we must shut down the server to clear the in-memory ShardingState associated with the * shardIdentity document. |