baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.93k stars 879 forks source link

同步最新braft之后,出现大量如下警告 #92

Closed ghost closed 5 years ago

ghost commented 5 years ago

default

chenzhangyi commented 5 years ago

@PFZheng

PFZheng commented 5 years ago

@xuxiping 确认一个事情,是否开启了 pipeline。raft_max_parallel_append_entries_rpc_num > 1(replicator.cpp 中)时意味着开启了,默认没有开启。如果开启了,check 一下 raft_enable_append_entries_cache 和 raft_max_append_entries_cache_size 这两个参数 (node.cpp 中)。开启 pipeline 的时候,并发的请求容易出现乱序,建议打开 cache。

PFZheng commented 5 years ago

如果没有开启 pipeline 的话,需要看下是不是中间有切主,term_unmatched 这个切主后的 stale 请求也会触发