[TD-10645][raft]<feature>add vote resp process

This commit is contained in:
lichuang 2021-11-22 10:04:47 +08:00
parent 68e6b82a66
commit b0c147f057
2 changed files with 1 additions and 3 deletions

View File

@ -39,8 +39,6 @@ struct SSyncRaftLog {
SyncIndex commitIndex; SyncIndex commitIndex;
SyncIndex appliedIndex; SyncIndex appliedIndex;
}; };
SSyncRaftLog* syncRaftLogOpen(); SSyncRaftLog* syncRaftLogOpen();

View File

@ -247,7 +247,7 @@ static int stepCandidate(SSyncRaft* pRaft, const SSyncMessage* pMsg) {
syncRaftHandleVoteRespMessage(pRaft, pMsg); syncRaftHandleVoteRespMessage(pRaft, pMsg);
return 0; return 0;
} else if (msgType == RAFT_MSG_APPEND) { } else if (msgType == RAFT_MSG_APPEND) {
syncRaftBecomeFollower(pRaft, pRaft->term, pMsg->from); syncRaftBecomeFollower(pRaft, pMsg->term, pMsg->from);
syncRaftHandleAppendEntriesMessage(pRaft, pMsg); syncRaftHandleAppendEntriesMessage(pRaft, pMsg);
} }
return 0; return 0;