Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

braft learner 接口相关 #478

Open
lengmoXXL opened this issue Nov 8, 2024 · 0 comments
Open

braft learner 接口相关 #478

lengmoXXL opened this issue Nov 8, 2024 · 0 comments

Comments

@lengmoXXL
Copy link

lengmoXXL commented Nov 8, 2024

在我们的业务场景里,有数据同步的需求。当前,我们在业务代码里,会用一个线程轮询 Node::read_committed_user_log,调用 install_snapshot/append_entries 实现了基于 braft::StateMachine 的 learner 接口。

由于后续 raft group 的数量可能会变得很多(例如几千),上面的方案可能就不再适用了。

我们在考虑复用 Replicator 的实现,不过看起来不能直接使用。
image

在这个场景下,Replicator 只会读 raft group 的数据,可以不影响 raft node 的状态,所以理论上它能够支持 follower 启动。关于能否复用,有什么建议吗?

另外,如果 Node 仅新增一个 new_replicator 的接口(不修改 node 内部的任何状态),社区有可能会接受这个 pr 吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant