diff options
author | Matthew Russotto <matthew.russotto@10gen.com> | 2017-05-15 14:33:22 -0400 |
---|---|---|
committer | Matthew Russotto <matthew.russotto@10gen.com> | 2017-05-15 15:26:27 -0400 |
commit | c88c4809c2440d286ed0fc29e1e8d684f015e563 (patch) | |
tree | 71962294640d0ddecacda316e8e1eda2323c9333 /src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp | |
parent | b69aed9d10ef66de42880fd379b0a593419b6e47 (diff) | |
download | mongo-c88c4809c2440d286ed0fc29e1e8d684f015e563.tar.gz |
SERVER-26990 Unify tracking of secondary state between replication and topology coordinators
This fixes a bug in the 6adc71f6cf069803f9c1288aef88ffe0d21c6ffe which caused crashes when a
sync source change was requested of a node not in the configuration. It also fixes a dependency
problem affecting the shared library build.
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp b/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp index cf543852022..4d42efe75eb 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp @@ -275,16 +275,10 @@ void ReplicationCoordinatorImpl::_onVoteRequestComplete(long long originalTerm) // Mark all nodes that responded to our vote request as up to avoid immediately // relinquishing primary. Date_t now = _replExecutor->now(); - const unordered_set<HostAndPort> liveNodes = _voteRequester->getResponders(); - for (auto& nodeInfo : _slaveInfo) { - if (liveNodes.count(nodeInfo.hostAndPort)) { - nodeInfo.down = false; - nodeInfo.lastUpdate = now; - } - } + _topCoord->resetMemberTimeouts(now, _voteRequester->getResponders()); // Prevent last committed optime from updating until we finish draining. - _setFirstOpTimeOfMyTerm_inlock( + _topCoord->setFirstOpTimeOfMyTerm( OpTime(Timestamp(std::numeric_limits<int>::max(), 0), std::numeric_limits<int>::max())); _voteRequester.reset(); |