Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-44

LeaderSelector does not assign leader randomly

    XMLWordPrintableJSON

Details

    Description

      The javadoc for LeaderSelector says leadership is assigned randomly but this does not appear to be the case.

      A fair mutex is used so it appears that leaders are selected in the order that they attempt to acquire the mutex.

      This probably wouldn't be much more than a documentation issue except that it tends to concentrate leaders on one node in the cluster when each node participates in more than one election (and assuming the node starts the LeaderSelectors right around the time the node comes up, which is the case in our usage).

      Attachments

        Activity

          People

            zarfide Jay Zarfoss
            awallgren Anders Wallgren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: