[td-98] add retry counting
This commit is contained in:
parent
44620e056c
commit
54f28dc5f3
|
@ -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);
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in New Issue