[
https://issues.apache.org/jira/browse/RATIS-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17175339#comment-17175339
]
runzhiwang commented on RATIS-967:
----------------------------------
[~szetszwo]
bq. BTW, we may consider adding "leader priority" instead of "preferred leader"
to each server. Lower priority servers yield to higher priority servers.
I agree. "leader priority" has implemented by sofa-jraft, the following is
their implementation.
1. Assign (selfPriority, targetPriority) to each group member, the member can
trigger a leader election if selfPriority > targetPriority. For example, when
init group, we can set the priority of suggested leader with (500, 400), and
the priority of two followers with (300, 400) and (200, 400), so only the
suggested leader can trigger leader election and will be elected as a leader.
2. But if the leader crash, two follower can not trigger leader election
because selfPriority < targetPriority. To address this, if follower can not
trigger leader election, and after a time threshold, there is no leader was
elected, follower will decrease it's targetPriority at a fix rate such as 20%
until selfPriority > targetPriority.
> Transfer leadership from leader to follower
> -------------------------------------------
>
> Key: RATIS-967
> URL: https://issues.apache.org/jira/browse/RATIS-967
> Project: Ratis
> Issue Type: Sub-task
> Components: raft-group
> Affects Versions: 0.5.0
> Reporter: maobaolong
> Assignee: runzhiwang
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> With this api, we can transition leader state to a specify one for datanodes
> in the same pipeline, OM group and SCM group.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)