fix invalid retry

This commit is contained in:
yihaoDeng 2024-09-19 19:29:16 +08:00
parent b6c9c27aff
commit eeff1ada10
1 changed files with 11 additions and 2 deletions

View File

@ -24,6 +24,14 @@ static inline void dmBuildMnodeRedirectRsp(SDnode *pDnode, SRpcMsg *pMsg) {
SEpSet epSet = {0};
dmGetMnodeEpSetForRedirect(&pDnode->data, pMsg, &epSet);
if (epSet.numOfEps == 0) {
pMsg->code = TSDB_CODE_MNODE_NOT_FOUND;
return;
} else if (epSet.numOfEps == 1) {
pMsg->code = TSDB_CODE_MNODE_NOT_FOUND;
return;
}
int32_t contLen = tSerializeSEpSet(NULL, 0, &epSet);
pMsg->pCont = rpcMallocCont(contLen);
if (pMsg->pCont == NULL) {
@ -109,7 +117,8 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
int32_t svrVer = 0;
(void)taosVersionStrToInt(version, &svrVer);
if ((code = taosCheckVersionCompatible(pRpc->info.cliVer, svrVer, 3)) != 0) {
dError("Version not compatible, cli ver: %d, svr ver: %d, ip:0x%x", pRpc->info.cliVer, svrVer, pRpc->info.conn.clientIp);
dError("Version not compatible, cli ver: %d, svr ver: %d, ip:0x%x", pRpc->info.cliVer, svrVer,
pRpc->info.conn.clientIp);
goto _OVER;
}