提交 0d5aad85 编写于 作者: dengyihao's avatar dengyihao

fix: opt trans debug info

上级 a73bd389
...@@ -22,6 +22,7 @@ extern "C" { ...@@ -22,6 +22,7 @@ extern "C" {
#include "os.h" #include "os.h"
#include "taoserror.h" #include "taoserror.h"
#include "theap.h" #include "theap.h"
#include "tmisce.h"
#include "transLog.h" #include "transLog.h"
#include "transportInt.h" #include "transportInt.h"
#include "trpc.h" #include "trpc.h"
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "transComm.h" #include "transComm.h"
typedef struct SConnList { typedef struct SConnList {
...@@ -1992,7 +1991,7 @@ FORCE_INLINE bool cliTryExtractEpSet(STransMsg* pResp, SEpSet* dst) { ...@@ -1992,7 +1991,7 @@ FORCE_INLINE bool cliTryExtractEpSet(STransMsg* pResp, SEpSet* dst) {
pResp->pCont = buf; pResp->pCont = buf;
pResp->contLen = len; pResp->contLen = len;
*dst = epset; epsetAssign(dst, &epset);
return true; return true;
} }
bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) { bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) {
...@@ -2017,7 +2016,7 @@ bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) { ...@@ -2017,7 +2016,7 @@ bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) {
} else { } else {
if (!transEpSetIsEqual(&pCtx->epSet, &epSet)) { if (!transEpSetIsEqual(&pCtx->epSet, &epSet)) {
tDebug("epset not equal, retry new epset"); tDebug("epset not equal, retry new epset");
pCtx->epSet = epSet; epsetAssign(&pCtx->epSet, &epSet);
noDelay = false; noDelay = false;
} else { } else {
if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) { if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) {
...@@ -2042,7 +2041,7 @@ bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) { ...@@ -2042,7 +2041,7 @@ bool cliResetEpset(STransConnCtx* pCtx, STransMsg* pResp, bool hasEpSet) {
} else { } else {
if (!transEpSetIsEqual(&pCtx->epSet, &epSet)) { if (!transEpSetIsEqual(&pCtx->epSet, &epSet)) {
tDebug("epset not equal, retry new epset"); tDebug("epset not equal, retry new epset");
pCtx->epSet = epSet; epsetAssign(&pCtx->epSet, &epSet);
noDelay = false; noDelay = false;
} else { } else {
if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) { if (pCtx->epsetRetryCnt >= pCtx->epSet.numOfEps) {
...@@ -2132,10 +2131,6 @@ bool cliGenRetryRule(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { ...@@ -2132,10 +2131,6 @@ bool cliGenRetryRule(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
if (pCtx->retryNextInterval >= pCtx->retryMaxInterval) { if (pCtx->retryNextInterval >= pCtx->retryMaxInterval) {
pCtx->retryNextInterval = pCtx->retryMaxInterval; pCtx->retryNextInterval = pCtx->retryMaxInterval;
} }
// if (-1 != pCtx->retryMaxTimeout && taosGetTimestampMs() - pCtx->retryInitTimestamp >= pCtx->retryMaxTimeout) {
// return false;
// }
} else { } else {
pCtx->retryNextInterval = 0; pCtx->retryNextInterval = 0;
pCtx->epsetRetryCnt++; pCtx->epsetRetryCnt++;
...@@ -2314,8 +2309,9 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran ...@@ -2314,8 +2309,9 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran
TRACE_SET_MSGID(&pReq->info.traceId, tGenIdPI64()); TRACE_SET_MSGID(&pReq->info.traceId, tGenIdPI64());
STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx)); STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx));
pCtx->epSet = *pEpSet; epsetAssign(&pCtx->epSet, pEpSet);
pCtx->origEpSet = *pEpSet; epsetAssign(&pCtx->origEpSet, pEpSet);
pCtx->ahandle = pReq->info.ahandle; pCtx->ahandle = pReq->info.ahandle;
pCtx->msgType = pReq->msgType; pCtx->msgType = pReq->msgType;
...@@ -2360,8 +2356,8 @@ int transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransMs ...@@ -2360,8 +2356,8 @@ int transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransMs
TRACE_SET_MSGID(&pReq->info.traceId, tGenIdPI64()); TRACE_SET_MSGID(&pReq->info.traceId, tGenIdPI64());
STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx)); STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx));
pCtx->epSet = *pEpSet; epsetAssign(&pCtx->epSet, pEpSet);
pCtx->origEpSet = *pEpSet; epsetAssign(&pCtx->origEpSet, pEpSet);
pCtx->ahandle = pReq->info.ahandle; pCtx->ahandle = pReq->info.ahandle;
pCtx->msgType = pReq->msgType; pCtx->msgType = pReq->msgType;
pCtx->pSem = sem; pCtx->pSem = sem;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册