From 4b87154b0e05914888b2bce5029d8f42ebe877b9 Mon Sep 17 00:00:00 2001 From: Minghao Li Date: Mon, 6 Jun 2022 11:40:37 +0800 Subject: [PATCH] enh(sync): forbid elect for this round --- source/libs/sync/src/syncRequestVote.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/sync/src/syncRequestVote.c b/source/libs/sync/src/syncRequestVote.c index bd0e684b86..4d1e259575 100644 --- a/source/libs/sync/src/syncRequestVote.c +++ b/source/libs/sync/src/syncRequestVote.c @@ -63,6 +63,7 @@ int32_t syncNodeOnRequestVoteCb(SSyncNode* ths, SyncRequestVote* pMsg) { // vote again, no harm raftStoreVote(ths->pRaftStore, &(pMsg->srcId)); + // forbid elect for this round syncNodeResetElectTimer(ths); }