enh(sync): forbid elect for this round

This commit is contained in:
Minghao Li 2022-06-06 11:46:59 +08:00
parent 4b87154b0e
commit 01b04e03d9
1 changed files with 3 additions and 0 deletions

View File

@ -105,6 +105,9 @@ int32_t syncNodeOnRequestVoteSnapshotCb(SSyncNode* ths, SyncRequestVote* pMsg) {
// maybe has already voted for pMsg->srcId
// vote again, no harm
raftStoreVote(ths->pRaftStore, &(pMsg->srcId));
// forbid elect for this round
syncNodeResetElectTimer(ths);
}
SyncRequestVoteReply* pReply = syncRequestVoteReplyBuild(ths->vgId);