fix: use correct error code

This commit is contained in:
Hongze Cheng 2024-08-22 17:52:44 +08:00
parent caf737ab19
commit 934d353865
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ int32_t syncNodeOnRequestVote(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
if (!syncNodeInRaftGroup(ths, &pMsg->srcId)) { if (!syncNodeInRaftGroup(ths, &pMsg->srcId)) {
syncLogRecvRequestVote(ths, pMsg, -1, "not in my config"); syncLogRecvRequestVote(ths, pMsg, -1, "not in my config");
TAOS_RETURN(TSDB_CODE_FAILED); TAOS_RETURN(TSDB_CODE_SYN_MISMATCHED_SIGNATURE);
} }
bool logOK = syncNodeOnRequestVoteLogOK(ths, pMsg); bool logOK = syncNodeOnRequestVoteLogOK(ths, pMsg);

View File

@ -46,7 +46,7 @@ int32_t syncNodeOnRequestVoteReply(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
if (!syncNodeInRaftGroup(ths, &(pMsg->srcId))) { if (!syncNodeInRaftGroup(ths, &(pMsg->srcId))) {
syncLogRecvRequestVoteReply(ths, pMsg, "not in my config"); syncLogRecvRequestVoteReply(ths, pMsg, "not in my config");
TAOS_RETURN(TSDB_CODE_FAILED); TAOS_RETURN(TSDB_CODE_SYN_MISMATCHED_SIGNATURE);
} }
SyncTerm currentTerm = raftStoreGetTerm(ths); SyncTerm currentTerm = raftStoreGetTerm(ths);
// drop stale response // drop stale response