Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-157

Peer can't find existing leader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • None
    • None
    • Reviewed

    Description

      In the patch of JIRA 127, I forgot to set the state of a peer when this peer is looking for a leader and it receives a message from the current leader. In this patch, I have fixed this problem, and also returned to what we had previously. With this current patch, when a peer joins and there is already a leader elected, the joining peer will only recognize the new leader as the leader once it receives a confirmation from a majority. The alternative is to set the leader once we receive a message from a peer claiming to be the leader (what we have on trunk now, although broken because we don't set the state of the peer), but there could be cases in which a peer believes to be leader, although it is not the leader any longer, and the joining peer would select this false leader to be its leader. Eventually, the false leader would timeout, and both processes would select the correct leader. This small fix gets rid of such problems, though.

      Attachments

        1. dead-follower.tar.gz
          3 kB
          Stu Hood
        2. ZOOKEEPER-157.patch
          0.7 kB
          Flavio Paiva Junqueira

        Activity

          People

            fpj Flavio Paiva Junqueira
            fpj Flavio Paiva Junqueira
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: