diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2017-03-23 01:25:09 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2017-04-19 18:11:10 -0400 |
commit | d0c851e2f4bfea514e22c97af1838640d2849a8c (patch) | |
tree | 956467fa52d24b3892aee23caeabb43022c3dc13 /src/mongo/db/repl/topology_coordinator.h | |
parent | 85472b2350952750b658178fc64bf80d8d357348 (diff) | |
download | mongo-d0c851e2f4bfea514e22c97af1838640d2849a8c.tar.gz |
SERVER-26848 Exit catchup mode when not syncing more data.
Diffstat (limited to 'src/mongo/db/repl/topology_coordinator.h')
-rw-r--r-- | src/mongo/db/repl/topology_coordinator.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mongo/db/repl/topology_coordinator.h b/src/mongo/db/repl/topology_coordinator.h index 2a2fc1259fb..37aad7459fa 100644 --- a/src/mongo/db/repl/topology_coordinator.h +++ b/src/mongo/db/repl/topology_coordinator.h @@ -499,6 +499,21 @@ public: */ virtual void setStorageEngineSupportsReadCommitted(bool supported) = 0; + /** + * Reset the booleans to record the last heartbeat restart. + */ + virtual void restartHeartbeats() = 0; + + /** + * Scans through all members that are 'up' and return the latest known optime, if we have + * received (successful or failed) heartbeats from all nodes since heartbeat restart. + * + * Returns boost::none if any node hasn't responded to a heartbeat since we last restarted + * heartbeats. + * Returns OpTime(Timestamp(0, 0), 0), the smallest OpTime in PV1, if other nodes are all down. + */ + virtual boost::optional<OpTime> latestKnownOpTimeSinceHeartbeatRestart() const = 0; + protected: TopologyCoordinator() {} }; |