[jboss-jira] [JBoss JIRA] (WFLY-8467) simple-election-policy is not sufficiently descriptive
Paul Ferraro (JIRA)
issues at jboss.org
Wed Mar 29 09:32:00 EDT 2017
Paul Ferraro created WFLY-8467:
----------------------------------
Summary: 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.Alpha1
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.2.3#72005)
More information about the jboss-jira
mailing list