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

Observers spam each other creating connections to the election addr

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 3.5.4, 3.6.0
    • None
    • None

    Description

      Hey shralex,

      I noticed today that my Observers are spamming each other trying to open connections to the election port. I've got tons of these:

      2013-11-01 22:19:45,819 - DEBUG [WorkerSender[myid=13]] - There is a connection already for server 9
      2013-11-01 22:19:45,819 - DEBUG [WorkerSender[myid=13]] - There is a connection already for server 10
      2013-11-01 22:19:45,819 - DEBUG [WorkerSender[myid=13]] - There is a connection already for server 6
      2013-11-01 22:19:45,819 - DEBUG [WorkerSender[myid=13]] - There is a connection already for server 12
      2013-11-01 22:19:45,819 - DEBUG [WorkerSender[myid=13]] - There is a connection already for server 14
      

      and so and so on ad nauseam.

      Now, looking around I found this inside FastLeaderElection.java from when you committed ZOOKEEPER-107:

           private void sendNotifications() {
      -        for (QuorumServer server : self.getVotingView().values()) {
      -            long sid = server.id;
      -
      +        for (long sid : self.getAllKnownServerIds()) {
      +            QuorumVerifier qv = self.getQuorumVerifier();
      

      Is that really desired? I suspect that is what's causing Observers to try to connect to each other (as opposed as just connecting to participants). I'll give it a try now and let you know. (Also, we use observer ids that are > 0, and I saw some parts of the code that might not deal with that assumption - so it could be that too..).

      Attachments

        1. ZOOKEEPER-1807-ver7.patch
          38 kB
          Alexander Shraer
        2. ZOOKEEPER-1807-ver6.patch
          24 kB
          Alexander Shraer
        3. ZOOKEEPER-1807-ver5.patch
          10 kB
          Alexander Shraer
        4. ZOOKEEPER-1807-ver4.patch
          10 kB
          Alexander Shraer
        5. ZOOKEEPER-1807-ver3.patch
          9 kB
          Alexander Shraer
        6. ZOOKEEPER-1807-ver2.patch
          10 kB
          Alexander Shraer
        7. ZOOKEEPER-1807-alex.patch
          2 kB
          Alexander Shraer
        8. ZOOKEEPER-1807.patch
          12 kB
          Raúl Gutiérrez Segalés
        9. notifications-loop.png
          44 kB
          Raúl Gutiérrez Segalés

        Issue Links

          Activity

            People

              shralex Alexander Shraer
              rgs Raúl Gutiérrez Segalés
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: