handle except
This commit is contained in:
parent
23d1e55718
commit
ffd105d0e0
|
@ -393,7 +393,6 @@ void cliHandleExcept(SCliConn* pConn) {
|
|||
transMsg.code = TSDB_CODE_RPC_NETWORK_UNAVAIL;
|
||||
transMsg.msgType = pMsg ? pMsg->msg.msgType + 1 : 0;
|
||||
transMsg.info.ahandle = NULL;
|
||||
transMsg.info.handle = pConn;
|
||||
|
||||
if (pMsg == NULL && !CONN_NO_PERSIST_BY_APP(pConn)) {
|
||||
transMsg.info.ahandle = transCtxDumpVal(&pConn->ctx, transMsg.msgType);
|
||||
|
@ -987,10 +986,14 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
|
|||
if (pCtx->retryCount == 0) {
|
||||
pCtx->origEpSet = pCtx->epSet;
|
||||
}
|
||||
|
||||
/*
|
||||
* upper layer handle retry if code equal TSDB_CODE_RPC_NETWORK_UNAVAIL
|
||||
*/
|
||||
/*
|
||||
* no retry
|
||||
* 1. query conn 2. rpc thread already receive quit msg
|
||||
*
|
||||
*/
|
||||
if (CONN_NO_PERSIST_BY_APP(pConn) && pThrd->quit == false) {
|
||||
tmsg_t msgType = pCtx->msgType;
|
||||
if ((pTransInst->retry != NULL && pEpSet->numOfEps > 1 && (pTransInst->retry(pResp->code))) ||
|
||||
|
@ -1014,6 +1017,7 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
|
|||
|
||||
transUnrefCliHandle(pConn);
|
||||
return -1;
|
||||
}
|
||||
} else if (pCtx->retryCount < TRANS_RETRY_COUNT_LIMIT) {
|
||||
if (pResp->contLen == 0) {
|
||||
pEpSet->inUse = (++pEpSet->inUse) % pEpSet->numOfEps;
|
||||
|
@ -1041,7 +1045,6 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
STraceId* trace = &pResp->info.traceId;
|
||||
if (pCtx->pSem != NULL) {
|
||||
tGTrace("%s conn %p(sync) handle resp", CONN_GET_INST_LABEL(pConn), pConn);
|
||||
|
|
Loading…
Reference in New Issue