opt transport

This commit is contained in:
yihaoDeng 2024-09-09 20:16:04 +08:00
parent 0b1e54568c
commit 334822f2d8
2 changed files with 9 additions and 0 deletions

View File

@ -3630,6 +3630,14 @@ static SCliConn* getConnFromHeapCache(SHashObj* pConnHeapCache, char* key) {
return NULL;
}
code = transHeapGet(pHeap, &pConn);
if (pConn && taosHashGetSize(pConn->pQTable) > 0) {
tDebug("get conn %p from heap cache for key:%s, status:%d, refCnt:%d", pConn, key, pConn->inHeap, pConn->reqRefCnt);
return NULL;
} /*else {
// tDebug("failed to get conn from heap cache for key:%s", key);
// return NULL;
}*/
if (code != 0) {
tDebug("failed to get conn from heap cache for key:%s", key);
return NULL;

View File

@ -1086,6 +1086,7 @@ void uvOnConnectionCb(uv_stream_t* q, ssize_t nread, const uv_buf_t* buf) {
pConn->serverIp = saddr.sin_addr.s_addr;
pConn->port = ntohs(addr.sin_port);
transSetConnOption((uv_tcp_t*)pConn->pTcp, 20);
(void)uv_read_start((uv_stream_t*)(pConn->pTcp), uvAllocRecvBufferCb, uvOnRecvCb);
} else {