diff options
author | Eric Milkie <milkie@10gen.com> | 2014-09-23 14:45:08 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2014-09-24 13:39:30 -0400 |
commit | 03d22b14a74564e686fad7b75c093eaf8371321b (patch) | |
tree | cadf7a4a6cd4ef37a557c9bc0ce0977d7cb3724e /src/mongo/db/repl/topology_coordinator.h | |
parent | ae200202f572851c22a82372b871f7981c8cea86 (diff) | |
download | mongo-03d22b14a74564e686fad7b75c093eaf8371321b.tar.gz |
SERVER-15089 add shouldChangeSyncSource() to topocoord
Diffstat (limited to 'src/mongo/db/repl/topology_coordinator.h')
-rw-r--r-- | src/mongo/db/repl/topology_coordinator.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/repl/topology_coordinator.h b/src/mongo/db/repl/topology_coordinator.h index b26c0ab5198..29e8316257a 100644 --- a/src/mongo/db/repl/topology_coordinator.h +++ b/src/mongo/db/repl/topology_coordinator.h @@ -125,6 +125,13 @@ namespace repl { virtual void blacklistSyncSource(const HostAndPort& host, Date_t until) = 0; /** + * Determine if a new sync source should be chosen, if a better candidate sync source is + * available. If the current sync source's last optime is more than _maxSyncSourceLagSecs + * behind any syncable source, this function returns true. + */ + virtual bool shouldChangeSyncSource(const HostAndPort& currentSource) const = 0; + + /** * Sets the earliest time the current node will stand for election to "newTime". * * Does not affect the node's state or the process of any elections in flight. |