Merge remote-tracking branch 'origin/3.0' into enh/opt-transport
This commit is contained in:
parent
437f9d64b4
commit
8df6527287
|
@ -102,6 +102,7 @@ typedef struct SCliConn {
|
||||||
void* heap; // point to req conn heap
|
void* heap; // point to req conn heap
|
||||||
int32_t heapMissHit;
|
int32_t heapMissHit;
|
||||||
int64_t lastAddHeapTime;
|
int64_t lastAddHeapTime;
|
||||||
|
int8_t forceDelFromHeap;
|
||||||
|
|
||||||
uv_buf_t* buf;
|
uv_buf_t* buf;
|
||||||
int32_t bufSize;
|
int32_t bufSize;
|
||||||
|
@ -1129,6 +1130,7 @@ static void cliDestroy(uv_handle_t* handle) {
|
||||||
tDebug("%s conn %p failed to all reqs since %s", CONN_GET_INST_LABEL(conn), conn, tstrerror(code));
|
tDebug("%s conn %p failed to all reqs since %s", CONN_GET_INST_LABEL(conn), conn, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
conn->forceDelFromHeap = 1;
|
||||||
code = delConnFromHeapCache(pThrd->connHeapCache, conn);
|
code = delConnFromHeapCache(pThrd->connHeapCache, conn);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
tDebug("%s conn %p failed to del conn from heapcach since %s", CONN_GET_INST_LABEL(conn), conn, tstrerror(code));
|
tDebug("%s conn %p failed to del conn from heapcach since %s", CONN_GET_INST_LABEL(conn), conn, tstrerror(code));
|
||||||
|
@ -1242,7 +1244,7 @@ static void cliHandleException(SCliConn* conn) {
|
||||||
transDQCancel(((SCliThrd*)conn->hostThrd)->timeoutQueue, conn->task);
|
transDQCancel(((SCliThrd*)conn->hostThrd)->timeoutQueue, conn->task);
|
||||||
conn->task = NULL;
|
conn->task = NULL;
|
||||||
}
|
}
|
||||||
|
conn->forceDelFromHeap = 1;
|
||||||
code = delConnFromHeapCache(pThrd->connHeapCache, conn);
|
code = delConnFromHeapCache(pThrd->connHeapCache, conn);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
tError("%s conn %p failed to del conn from heapcach since %s", CONN_GET_INST_LABEL(conn), conn, tstrerror(code));
|
tError("%s conn %p failed to del conn from heapcach since %s", CONN_GET_INST_LABEL(conn), conn, tstrerror(code));
|
||||||
|
@ -3881,7 +3883,7 @@ int32_t transHeapDelete(SHeap* heap, SCliConn* p) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
int64_t now = taosGetTimestampMs();
|
int64_t now = taosGetTimestampMs();
|
||||||
if (now - p->lastAddHeapTime < 10000) {
|
if (p->forceDelFromHeap == 0 && now - p->lastAddHeapTime < 10000) {
|
||||||
tTrace("conn %p not added/delete to heap frequently", p);
|
tTrace("conn %p not added/delete to heap frequently", p);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue