diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 102d82bcb1..a6c26d4b8f 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -266,11 +266,15 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg) { rpcFreeCont(rpcMsg->pCont); return; } else { - tscTrace("%p it shall renew meter meta, code:%d", pSql, tstrerror(rpcMsg->code)); + tscTrace("%p it shall renew table meta, code:%d", pSql, tstrerror(rpcMsg->code)); pSql->maxRetry = TSDB_VNODES_SUPPORT * 2; pSql->res.code = rpcMsg->code; // keep the previous error code - + if (++pSql->retry > pSql->maxRetry) { + tscError("%p max retry %d reached, ", pSql, pSql->retry); + return; + } + rpcMsg->code = tscRenewMeterMeta(pSql, pTableMetaInfo->name); if (pTableMetaInfo->pTableMeta) { @@ -2449,7 +2453,7 @@ static void tscWaitingForCreateTable(SSqlCmd *pCmd) { int tscRenewMeterMeta(SSqlObj *pSql, char *tableId) { int code = 0; - // handle metric meta renew process + // handle table meta renew process SSqlCmd *pCmd = &pSql->cmd; SQueryInfo * pQueryInfo = tscGetQueryInfoDetail(pCmd, 0); diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 6f86c2dd7c..7e6f024422 100755 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -1096,6 +1096,10 @@ static void rpcProcessConnError(void *param, void *id) { SRpcInfo *pRpc = pContext->pRpc; SRpcMsg rpcMsg; + if (pRpc == NULL) { + return; + } + tTrace("%s connection error happens", pRpc->label); if ( pContext->numOfTry >= pContext->ipSet.numOfIps ) {