Github user JonathanO commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/456#discussion_r166036745
--- Diff:
src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
@@ -689,15 +669,15 @@ synchronized void connectOne(long sid){
Map<Long, QuorumPeer.QuorumServer> lastProposedView =
lastSeenQV.getAllMembers();
if (lastCommittedView.containsKey(sid)) {
knownId = true;
- if (connectOne(sid,
lastCommittedView.get(sid).electionAddr))
- return;
--- End diff --
This part of the change isn't quite right since it relied on connectOne
returning false on an IOException calling sock.connect(). We will no longer
attempt to use lastProposedView.get(sid).electionAddr in the case that a
connection using the lastCommittedView failed and the electionAddr has changed.
I don't know what effect this will have. Maybe I need to move this condition
into the async connection mechanism too?
---