[TD-10645][raft]<feature>add vote resp process
This commit is contained in:
parent
68e6b82a66
commit
b0c147f057
|
@ -39,8 +39,6 @@ struct SSyncRaftLog {
|
||||||
SyncIndex commitIndex;
|
SyncIndex commitIndex;
|
||||||
|
|
||||||
SyncIndex appliedIndex;
|
SyncIndex appliedIndex;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SSyncRaftLog* syncRaftLogOpen();
|
SSyncRaftLog* syncRaftLogOpen();
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue