fix retry error

This commit is contained in:
yihaoDeng 2024-10-21 21:01:33 +08:00
parent 3b5a8531e3
commit 5ee1c9b70a
1 changed files with 10 additions and 3 deletions

View File

@ -29,9 +29,16 @@ static inline void dmBuildMnodeRedirectRsp(SDnode *pDnode, SRpcMsg *pMsg) {
dmGetMnodeEpSetForRedirect(&pDnode->data, pMsg, &epSet); dmGetMnodeEpSetForRedirect(&pDnode->data, pMsg, &epSet);
if (epSet.numOfEps <= 1) { if (epSet.numOfEps <= 1) {
pMsg->pCont = NULL; if (epSet.numOfEps == 0) {
pMsg->code = TSDB_CODE_MNODE_NOT_FOUND; pMsg->pCont = NULL;
return; pMsg->code = TSDB_CODE_MNODE_NOT_FOUND;
return;
}
if (strcmp(epSet.eps[0].fqdn, tsLocalFqdn) == 0 && epSet.eps[0].port == tsServerPort) {
pMsg->pCont = NULL;
pMsg->code = TSDB_CODE_MNODE_NOT_FOUND;
return;
}
} }
int32_t contLen = tSerializeSEpSet(NULL, 0, &epSet); int32_t contLen = tSerializeSEpSet(NULL, 0, &epSet);