[ 
https://issues.apache.org/jira/browse/RATIS-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17277742#comment-17277742
 ] 

Tsz-wo Sze commented on RATIS-1301:
-----------------------------------

[~amaliujia], we need to think how about how to change the data structure for 
supporting Listener and Leader. There are at least two choices:
 # changing RaftGroup and no change to RaftPeer, i.e. add a list of Listener 
and a list of Learner to RaftGroup.
 # changing RaftPeer and no change to RaftGroup, i.e. add a flag/enum to 
indicate that a server is a Listener/Learner in RaftPeer.

#2 may be easier than #1 according to our experience in adding priority; see 
RATIS-1032.

We should also think about how to support automatically changing a Learner to a 
follower in the data structure. (Listener is easy since it requires an admin to 
change it such as using AdminProtocol.setConfiguration(..).)

As [~yjxxtd] pointed out in the [this 
comment|https://github.com/apache/incubator-ratis/pull/409#issuecomment-772206230],
 we need to change RaftGroupProto or RaftPeerProto in raft.proto once we have 
decided the data structure.

> LeaderElection works when Listener is in RaftGroup
> --------------------------------------------------
>
>                 Key: RATIS-1301
>                 URL: https://issues.apache.org/jira/browse/RATIS-1301
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> A listener is a role that only receives AppendEntries and InstallSnapshot 
> (thus does not serve read and write requests). Listener keeps catch up 
> RaftLog from the leader and will not automatically become a learner (or 
> follower) unless it is promoted. 
>   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to