zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JonathanO <...@git.apache.org>
Subject [GitHub] zookeeper pull request #456: ZOOKEEPER-2930: Leader cannot be elected due to...
Date Mon, 05 Feb 2018 16:54:54 GMT
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?


---

Mime
View raw message