add config
This commit is contained in:
parent
4579940660
commit
54bae9d592
|
@ -1102,7 +1102,6 @@ static void cliDestroy(uv_handle_t* handle) {
|
||||||
if (uv_handle_get_type(handle) != UV_TCP || handle->data == NULL) {
|
if (uv_handle_get_type(handle) != UV_TCP || handle->data == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SCliConn* conn = handle->data;
|
SCliConn* conn = handle->data;
|
||||||
SCliThrd* pThrd = conn->hostThrd;
|
SCliThrd* pThrd = conn->hostThrd;
|
||||||
cliResetConnTimer(conn);
|
cliResetConnTimer(conn);
|
||||||
|
@ -1223,6 +1222,11 @@ static void cliHandleException(SCliConn* conn) {
|
||||||
conn->list = NULL;
|
conn->list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conn->task != NULL) {
|
||||||
|
transDQCancel(((SCliThrd*)conn->hostThrd)->timeoutQueue, conn->task);
|
||||||
|
conn->task = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (conn->registered) {
|
if (conn->registered) {
|
||||||
int8_t ref = transGetRefCount(conn);
|
int8_t ref = transGetRefCount(conn);
|
||||||
if (ref == 0 && !uv_is_closing((uv_handle_t*)conn->stream)) {
|
if (ref == 0 && !uv_is_closing((uv_handle_t*)conn->stream)) {
|
||||||
|
@ -3667,8 +3671,7 @@ static FORCE_INLINE int8_t shouldSWitchToOtherConn(SCliConn* pConn, char* key) {
|
||||||
int32_t stateNum = taosHashGetSize(pConn->pQTable);
|
int32_t stateNum = taosHashGetSize(pConn->pQTable);
|
||||||
int32_t totalReqs = reqsNum + reqsSentOut;
|
int32_t totalReqs = reqsNum + reqsSentOut;
|
||||||
|
|
||||||
if (((totalReqs >= pInst->shareConnLimit / 2) && (stateNum >= pInst->shareConnLimit)) ||
|
if (totalReqs >= pInst->shareConnLimit) {
|
||||||
totalReqs >= pInst->shareConnLimit) {
|
|
||||||
if (pConn->list == NULL && pConn->dstAddr != NULL) {
|
if (pConn->list == NULL && pConn->dstAddr != NULL) {
|
||||||
pConn->list = taosHashGet((SHashObj*)pThrd->pool, pConn->dstAddr, strlen(pConn->dstAddr));
|
pConn->list = taosHashGet((SHashObj*)pThrd->pool, pConn->dstAddr, strlen(pConn->dstAddr));
|
||||||
if (pConn->list != NULL) {
|
if (pConn->list != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue