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.86k stars 865 forks source link

BallotBox中是否可以维护每个Peer的matchIndex而不是给每个Log维护一个Ballot以提高commit性能? #409

Open cangfengzhs opened 1 year ago

cangfengzhs commented 1 year ago

在BallotBox中只维护每个Peer的matchIndex(每个peer已经commit的Index)。在CommitAt中推高matchIndex,并根据matchIndex判断Majority的commitIndex最小值。

这样是否会比给每个Log维护一个Ballot有显著的Commit性能提升?