sofastack / sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.
https://www.sofastack.tech/projects/sofa-jraft/
Apache License 2.0
3.57k stars 1.14k forks source link

获取存活follower #91

Closed dehuiliu closed 5 years ago

dehuiliu commented 5 years ago

作为leader,想获取存活的follower,通知存活的follower处理数据。

目前存在 com.alipay.sofa.jraft.core.ReplicatorGroupImpl#failureReplicators,但是接口没有提供获取的方法。

fengjiachun commented 5 years ago

你好,我们会考虑一下在 cliService 增加一个 getActivePeers api

fengjiachun commented 5 years ago

getAlivePeers 可能更好些?

dehuiliu commented 5 years ago

为什么在 CliService 中添加 getAlivePeers?

fengjiachun commented 5 years ago

为什么在 CliService 中添加 getAlivePeers?

leader 以外节点甚至 jraft 集群以外都应可以获取到这存活列表

killme2008 commented 5 years ago

Node 接口添加,同时在 cliService 提供。

dehuiliu commented 5 years ago

赞同 killme2008 的提议。

fengjiachun commented 5 years ago

抱歉是我没说明白