refactor transport
This commit is contained in:
parent
bd132a8fbd
commit
5e39dd9b36
|
@ -481,6 +481,11 @@ int8_t cliMayRecycleConn(SCliConn* conn) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
SCliThrd* pThrd = conn->hostThrd;
|
SCliThrd* pThrd = conn->hostThrd;
|
||||||
STrans* pInst = pThrd->pInst;
|
STrans* pInst = pThrd->pInst;
|
||||||
|
|
||||||
|
tTrace("%s conn %p in-process req summary:reqsToSend:%d, reqsSentOut:%d, statusTableSize:%d",
|
||||||
|
CONN_GET_INST_LABEL(conn), conn, transQueueSize(&conn->reqsToSend), transQueueSize(&conn->reqsSentOut),
|
||||||
|
taosHashGetSize(conn->pQTable));
|
||||||
|
|
||||||
if (transQueueSize(&conn->reqsToSend) == 0 && transQueueSize(&conn->reqsSentOut) == 0 &&
|
if (transQueueSize(&conn->reqsToSend) == 0 && transQueueSize(&conn->reqsSentOut) == 0 &&
|
||||||
taosHashGetSize(conn->pQTable) == 0) {
|
taosHashGetSize(conn->pQTable) == 0) {
|
||||||
cliResetConnTimer(conn);
|
cliResetConnTimer(conn);
|
||||||
|
@ -518,6 +523,8 @@ int8_t cliMayRecycleConn(SCliConn* conn) {
|
||||||
int32_t topReqs = transQueueSize(&topConn->reqsSentOut) + transQueueSize(&topConn->reqsToSend);
|
int32_t topReqs = transQueueSize(&topConn->reqsSentOut) + transQueueSize(&topConn->reqsToSend);
|
||||||
int32_t currReqs = transQueueSize(&conn->reqsSentOut) + transQueueSize(&conn->reqsToSend);
|
int32_t currReqs = transQueueSize(&conn->reqsSentOut) + transQueueSize(&conn->reqsToSend);
|
||||||
if (topReqs <= currReqs) {
|
if (topReqs <= currReqs) {
|
||||||
|
tTrace("%s conn %p not balance conn heap since top conn has less req, topConnReqs:%d, currConnReqs:%d",
|
||||||
|
CONN_GET_INST_LABEL(conn), conn, topReqs, currReqs);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
tDebug("%s conn %p do balance conn heap since top conn has more reqs, topConnReqs:%d, currConnReqs:%d",
|
tDebug("%s conn %p do balance conn heap since top conn has more reqs, topConnReqs:%d, currConnReqs:%d",
|
||||||
|
|
Loading…
Reference in New Issue