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

Fix typo in doc. #382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cn/cli.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
braft提供了一系列API用来控制复制主或者具体节点, 可以选择在程序了调用[API](../../src/braft/cli.h)或者使用[braft_cli](../../tools/braft_cli.cpp)来给节点发远程控制命令
braft提供了一系列API用来控制复制主或者具体节点, 可以选择在程序里调用[API](../../src/braft/cli.h)或者使用[braft_cli](../../tools/braft_cli.cpp)来给节点发远程控制命令

# API

Expand Down
2 changes: 1 addition & 1 deletion docs/cn/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void apply(const Task& task);

* 由于apply是异步的,有可能某个节点在term1是leader,apply了一条log,但是中间发生了主从切换,在很短的时间内这个节点又变为term3的leader,之前apply的日志才开始进行处理,这种情况下要实现严格意义上的复制状态机,需要解决这种ABA问题,可以在apply的时候设置leader当时的term.

raft::Closure是一个特殊的protobuf::Closure的子类, 可以用了标记一次异步调用成功或者失败. 和protobuf::Closure一样, 你需要继承这个类,实现Run接口。 当一次异步调用真正结束之后, Run会被框架调用, 此时你可以通过[status()](https://github.com/brpc/brpc/src/butil/status.h)来确认这次调用是否成功或者失败。
raft::Closure是一个特殊的protobuf::Closure的子类, 可以用来标记一次异步调用成功或者失败. 和protobuf::Closure一样, 你需要继承这个类,实现Run接口。 当一次异步调用真正结束之后, Run会被框架调用, 此时你可以通过[status()](https://github.com/brpc/brpc/src/butil/status.h)来确认这次调用是否成功或者失败。

```cpp
// Raft-specific closure which encloses a base::Status to report if the
Expand Down