[jboss-jira] [JBoss JIRA] (WFLY-8467) simple-election-policy is not sufficiently descriptive

Kabir Khan (JIRA) issues at jboss.org
Thu Feb 15 13:14:12 EST 2018


     [ https://issues.jboss.org/browse/WFLY-8467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kabir Khan updated WFLY-8467:
-----------------------------
    Fix Version/s: 12.0.0.CR1
                       (was: 12.0.0.Beta1)


> simple-election-policy is not sufficiently descriptive
> ------------------------------------------------------
>
>                 Key: WFLY-8467
>                 URL: https://issues.jboss.org/browse/WFLY-8467
>             Project: WildFly
>          Issue Type: Enhancement
>          Components: Clustering
>    Affects Versions: 11.0.0.Alpha1
>            Reporter: Paul Ferraro
>            Assignee: Paul Ferraro
>             Fix For: 12.0.0.CR1
>
>
> simple-election-policy was originally a port of http://anonsvn.jboss.org/repos/jbossas/trunk/cluster/src/main/java/org/jboss/ha/singleton/HASingletonElectionPolicySimple.java
> It's time to revisit this.  
> 1. The term "simple" doesn't at all describe how the policy elects the primary node.
> 2. "position" isn't intuitive either - until you realize that it is a reference to the underlying data structure.
> 3. Is the ability to specify the nth youngest or oldest node a realistic requirement?
> We can generalize this policy as doing 2 things:
>   a. Sorts the candidates based on some criteria (e.g. age, name)
>   b. Select the head of the sorted list
> This is logically equivalent to:
> members.stream().sort(comparator).findFirst();
> Proposal:
> <age-election-policy sort="DESCENDING|ASCENDING"/>
> <name-election-policy sort="ASCENDING|DESCENDING"/>



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list