Skip to content

Commit

Permalink
ISSUE-132: becomeCandidate don't count learners' prevote
Browse files Browse the repository at this point in the history
  • Loading branch information
DongbinCheng committed Jun 5, 2024
1 parent b92542a commit 2e21b3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/infra/raft/v2/RaftCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,9 @@ void RaftCore::becomeCandidate() {

for (const auto &p : mPeers) {
auto &peer = p.second;
if (mLearners.find(peer.mId) != mLearners.end()) {
continue;
}
if (peer.mHaveVote) {
++voteNum;
}
Expand Down

0 comments on commit 2e21b3b

Please sign in to comment.