summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/topology_coordinator.h
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2014-09-23 14:45:08 -0400
committerEric Milkie <milkie@10gen.com>2014-09-24 13:39:30 -0400
commit03d22b14a74564e686fad7b75c093eaf8371321b (patch)
treecadf7a4a6cd4ef37a557c9bc0ce0977d7cb3724e /src/mongo/db/repl/topology_coordinator.h
parentae200202f572851c22a82372b871f7981c8cea86 (diff)
downloadmongo-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.h7
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.