summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/initial_syncer.h
diff options
context:
space:
mode:
authorWilliam Schultz <william.schultz@mongodb.com>2017-06-02 16:58:37 -0400
committerWilliam Schultz <william.schultz@mongodb.com>2017-06-08 18:19:40 -0400
commit1c56f5dd262111f921203d403f54fedb18772792 (patch)
treef10788ef94495fe6d3c6ef71f1eff77738f86c12 /src/mongo/db/repl/initial_syncer.h
parentcce59be2127c2f30d9e98b895c9d79e0a3b2e157 (diff)
downloadmongo-1c56f5dd262111f921203d403f54fedb18772792.tar.gz
SERVER-28677 InitialSyncer should reset optimes on every attempt
Diffstat (limited to 'src/mongo/db/repl/initial_syncer.h')
-rw-r--r--src/mongo/db/repl/initial_syncer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/repl/initial_syncer.h b/src/mongo/db/repl/initial_syncer.h
index b438a0c97e1..8ee406d8876 100644
--- a/src/mongo/db/repl/initial_syncer.h
+++ b/src/mongo/db/repl/initial_syncer.h
@@ -81,6 +81,9 @@ struct InitialSyncerOptions {
/** Function to update optime of last operation applied on this node */
using SetMyLastOptimeFn = stdx::function<void(const OpTime&)>;
+ /** Function to reset all optimes on this node (e.g. applied & durable). */
+ using ResetOptimesFn = stdx::function<void()>;
+
/** Function to sets this node into a specific follower mode. */
using SetFollowerModeFn = stdx::function<bool(const MemberState&)>;
@@ -109,6 +112,7 @@ struct InitialSyncerOptions {
GetMyLastOptimeFn getMyLastOptime;
SetMyLastOptimeFn setMyLastOptime;
+ ResetOptimesFn resetOptimes;
GetSlaveDelayFn getSlaveDelay;
SyncSourceSelector* syncSourceSelector = nullptr;