tikv / raft-rs

Raft distributed consensus algorithm implemented in Rust.
Apache License 2.0
2.93k stars 394 forks source link

support to adjust max inflight msgs #450

Closed hicqu closed 3 years ago

hicqu commented 3 years ago

Signed-off-by: qupeng qupeng@pingcap.com

Sometimes we want to custom max-inflight-msgs for a given peer. For example, the target peer's memory or disk usage is almost full. This PR allows this.

BTW a bug in inflight_buffers_size is fixed. With the patch its return value is real size instead of length.

hicqu commented 3 years ago

@jayzhan211 could you take a look again?