]
Jason Greene updated WFLY-8467:
-------------------------------
Fix Version/s: 13.0.0.Beta1
(was: 12.0.0.Final)
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: 13.0.0.Beta1
simple-election-policy was originally a port of
http://anonsvn.jboss.org/repos/jbossas/trunk/cluster/src/main/java/org/jb...
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"/>