fix invalid retry
This commit is contained in:
parent
b6c9c27aff
commit
eeff1ada10
|
@ -24,6 +24,14 @@ static inline void dmBuildMnodeRedirectRsp(SDnode *pDnode, SRpcMsg *pMsg) {
|
||||||
SEpSet epSet = {0};
|
SEpSet epSet = {0};
|
||||||
dmGetMnodeEpSetForRedirect(&pDnode->data, pMsg, &epSet);
|
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);
|
int32_t contLen = tSerializeSEpSet(NULL, 0, &epSet);
|
||||||
pMsg->pCont = rpcMallocCont(contLen);
|
pMsg->pCont = rpcMallocCont(contLen);
|
||||||
if (pMsg->pCont == NULL) {
|
if (pMsg->pCont == NULL) {
|
||||||
|
@ -109,7 +117,8 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
|
||||||
int32_t svrVer = 0;
|
int32_t svrVer = 0;
|
||||||
(void)taosVersionStrToInt(version, &svrVer);
|
(void)taosVersionStrToInt(version, &svrVer);
|
||||||
if ((code = taosCheckVersionCompatible(pRpc->info.cliVer, svrVer, 3)) != 0) {
|
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;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue