From b0c147f05770bf1560a3115aa81724e47d9d74e0 Mon Sep 17 00:00:00 2001 From: lichuang Date: Mon, 22 Nov 2021 10:04:47 +0800 Subject: [PATCH] [TD-10645][raft]add vote resp process --- source/libs/sync/inc/raft_log.h | 2 -- source/libs/sync/src/sync_raft_impl.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/source/libs/sync/inc/raft_log.h b/source/libs/sync/inc/raft_log.h index dc10c59b28..117ed42c2c 100644 --- a/source/libs/sync/inc/raft_log.h +++ b/source/libs/sync/inc/raft_log.h @@ -39,8 +39,6 @@ struct SSyncRaftLog { SyncIndex commitIndex; SyncIndex appliedIndex; - - }; SSyncRaftLog* syncRaftLogOpen(); diff --git a/source/libs/sync/src/sync_raft_impl.c b/source/libs/sync/src/sync_raft_impl.c index 4d8222e826..3050bb2c8a 100644 --- a/source/libs/sync/src/sync_raft_impl.c +++ b/source/libs/sync/src/sync_raft_impl.c @@ -247,7 +247,7 @@ static int stepCandidate(SSyncRaft* pRaft, const SSyncMessage* pMsg) { syncRaftHandleVoteRespMessage(pRaft, pMsg); return 0; } else if (msgType == RAFT_MSG_APPEND) { - syncRaftBecomeFollower(pRaft, pRaft->term, pMsg->from); + syncRaftBecomeFollower(pRaft, pMsg->term, pMsg->from); syncRaftHandleAppendEntriesMessage(pRaft, pMsg); } return 0;