Merge pull request #27409 from taosdata/fix/TD-31612-3.0
fix: use correct error code
This commit is contained in:
commit
56045c23c1
|
@ -785,7 +785,7 @@ int32_t mndProcessSyncMsg(SRpcMsg *pMsg) {
|
|||
|
||||
int32_t code = syncProcessMsg(pMgmt->sync, pMsg);
|
||||
if (code != 0) {
|
||||
mGError("vgId:1, failed to process sync msg:%p type:%s, errno: %s, code:0x%x", pMsg, TMSG_INFO(pMsg->msgType),
|
||||
mGError("vgId:1, failed to process sync msg:%p type:%s, reason: %s, code:0x%x", pMsg, TMSG_INFO(pMsg->msgType),
|
||||
tstrerror(code), code);
|
||||
}
|
||||
|
||||
|
|
|
@ -373,8 +373,8 @@ int32_t vnodeProcessSyncMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
|
|||
|
||||
int32_t code = syncProcessMsg(pVnode->sync, pMsg);
|
||||
if (code != 0) {
|
||||
vGError("vgId:%d, failed to process sync msg:%p type:%s, errno: %s, code:0x%x", pVnode->config.vgId, pMsg,
|
||||
TMSG_INFO(pMsg->msgType), terrstr(), code);
|
||||
vGError("vgId:%d, failed to process sync msg:%p type:%s, reason: %s", pVnode->config.vgId, pMsg,
|
||||
TMSG_INFO(pMsg->msgType), tstrerror(code));
|
||||
}
|
||||
|
||||
return code;
|
||||
|
|
|
@ -269,8 +269,8 @@ int32_t syncProcessMsg(int64_t rid, SRpcMsg* pMsg) {
|
|||
|
||||
syncNodeRelease(pSyncNode);
|
||||
if (code != 0) {
|
||||
sDebug("vgId:%d, failed to process sync msg:%p type:%s since 0x%x", pSyncNode->vgId, pMsg, TMSG_INFO(pMsg->msgType),
|
||||
code);
|
||||
sDebug("vgId:%d, failed to process sync msg:%p type:%s since %s", pSyncNode->vgId, pMsg, TMSG_INFO(pMsg->msgType),
|
||||
tstrerror(code));
|
||||
}
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ int32_t syncNodeOnRequestVote(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
|||
if (!syncNodeInRaftGroup(ths, &pMsg->srcId)) {
|
||||
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);
|
||||
|
|
|
@ -46,7 +46,7 @@ int32_t syncNodeOnRequestVoteReply(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
|||
if (!syncNodeInRaftGroup(ths, &(pMsg->srcId))) {
|
||||
syncLogRecvRequestVoteReply(ths, pMsg, "not in my config");
|
||||
|
||||
TAOS_RETURN(TSDB_CODE_FAILED);
|
||||
TAOS_RETURN(TSDB_CODE_SYN_MISMATCHED_SIGNATURE);
|
||||
}
|
||||
SyncTerm currentTerm = raftStoreGetTerm(ths);
|
||||
// drop stale response
|
||||
|
|
Loading…
Reference in New Issue