summaryrefslogtreecommitdiff
path: root/src/mongo/client/replica_set_monitor_internal.h
diff options
context:
space:
mode:
authorDaniel Alabi <alabidan@gmail.com>2015-05-29 16:37:42 -0400
committerDaniel Alabi <alabidan@gmail.com>2015-05-29 16:54:49 -0400
commit6f3fc07e0a9c0bbb8543ec7618debe862a40b3b2 (patch)
tree62adf7b065790c0221ee9ab819a9922ee32b38ae /src/mongo/client/replica_set_monitor_internal.h
parent7ebc898162b960e9801d5cf4fed2303aaff43589 (diff)
downloadmongo-6f3fc07e0a9c0bbb8543ec7618debe862a40b3b2.tar.gz
SERVER-18280 ReplicaSetMonitor should use electionId to avoid talking to old primaries
Diffstat (limited to 'src/mongo/client/replica_set_monitor_internal.h')
-rw-r--r--src/mongo/client/replica_set_monitor_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/client/replica_set_monitor_internal.h b/src/mongo/client/replica_set_monitor_internal.h
index 7f434c302e7..ba19ad1eb82 100644
--- a/src/mongo/client/replica_set_monitor_internal.h
+++ b/src/mongo/client/replica_set_monitor_internal.h
@@ -69,6 +69,7 @@ namespace mongo {
bool isMaster;
bool secondary;
bool hidden;
+ OID electionId; // Set if this isMaster reply is from the primary
HostAndPort primary; // empty if not present
std::set<HostAndPort> normalHosts; // both "hosts" and "passives"
BSONObj tags;
@@ -177,6 +178,7 @@ namespace mongo {
const std::string name; // safe to read outside lock since it is const
int consecutiveFailedScans;
std::set<HostAndPort> seedNodes; // updated whenever a master reports set membership changes
+ OID maxElectionId; // largest election id observed by this ReplicaSetMonitor
HostAndPort lastSeenMaster; // empty if we have never seen a master. can be same as current
Nodes nodes; // maintained sorted and unique by host
ScanStatePtr currentScan; // NULL if no scan in progress