diff options
author | Samy Lanka <samy.lanka@10gen.com> | 2017-06-19 15:43:11 -0400 |
---|---|---|
committer | Samy Lanka <samy.lanka@10gen.com> | 2017-06-30 16:23:39 -0400 |
commit | 453028f378f8344197cea0e3ded53f445ccd5abf (patch) | |
tree | 8aca7d4ab9c7f34f135cc3659a6c828336f214fc /src/mongo/db/repl/repl_set_config.h | |
parent | c63465a42ed89ee6563841d7b349fa85de69963e (diff) | |
download | mongo-453028f378f8344197cea0e3ded53f445ccd5abf.tar.gz |
SERVER-29499 Schedule a catchup takeover on receiving heartbeats from the current primary
Diffstat (limited to 'src/mongo/db/repl/repl_set_config.h')
-rw-r--r-- | src/mongo/db/repl/repl_set_config.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/repl/repl_set_config.h b/src/mongo/db/repl/repl_set_config.h index 3f226ae9295..0b8b868d747 100644 --- a/src/mongo/db/repl/repl_set_config.h +++ b/src/mongo/db/repl/repl_set_config.h @@ -66,6 +66,7 @@ public: static const Seconds kDefaultHeartbeatTimeoutPeriod; static const Milliseconds kDefaultCatchUpTimeoutPeriod; static const bool kDefaultChainingAllowed; + static const Milliseconds kDefaultCatchupTakeoverDelay; /** * Initializes this ReplSetConfig from the contents of "cfg". @@ -340,6 +341,12 @@ public: */ Milliseconds getPriorityTakeoverDelay(int memberIdx) const; + /** + * Returns the duration to wait before running for election when this node + * sees that it is more caught up than the current primary. + */ + Milliseconds getCatchupTakeoverDelay() const; + private: /** * Parses the "settings" subdocument of a replica set configuration. |