fix: use correct error code
This commit is contained in:
parent
caf737ab19
commit
934d353865
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue