fix invalid code
This commit is contained in:
parent
3de71e39b4
commit
d22e97d256
|
@ -284,9 +284,9 @@ int32_t dmInitClient(SDnode *pDnode) {
|
||||||
rpcInit.failFastThreshold = 3; // failed threshold
|
rpcInit.failFastThreshold = 3; // failed threshold
|
||||||
rpcInit.ffp = dmFailFastFp;
|
rpcInit.ffp = dmFailFastFp;
|
||||||
|
|
||||||
int32_t connLimitNum = 30000 / (tsNumOfRpcThreads * 3);
|
int32_t connLimitNum = 10000 / (tsNumOfRpcThreads * 3);
|
||||||
connLimitNum = TMAX(connLimitNum, 500);
|
connLimitNum = TMAX(connLimitNum, 100);
|
||||||
connLimitNum = TMIN(connLimitNum, 1000);
|
connLimitNum = TMIN(connLimitNum, 600);
|
||||||
|
|
||||||
rpcInit.connLimitNum = connLimitNum;
|
rpcInit.connLimitNum = connLimitNum;
|
||||||
rpcInit.connLimitLock = 1;
|
rpcInit.connLimitLock = 1;
|
||||||
|
|
|
@ -1071,21 +1071,23 @@ static void cliHandleBatchReq(SCliBatch* pBatch, SCliThrd* pThrd) {
|
||||||
}
|
}
|
||||||
static void cliSendBatchCb(uv_write_t* req, int status) {
|
static void cliSendBatchCb(uv_write_t* req, int status) {
|
||||||
SCliConn* conn = req->data;
|
SCliConn* conn = req->data;
|
||||||
taosMemoryFree(req);
|
|
||||||
|
|
||||||
SCliThrd* thrd = conn->hostThrd;
|
SCliThrd* thrd = conn->hostThrd;
|
||||||
cliDestroyBatch(conn->pBatch);
|
SCliBatch* p = conn->pBatch;
|
||||||
|
|
||||||
conn->pBatch = NULL;
|
conn->pBatch = NULL;
|
||||||
|
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
tDebug("%p conn %p failed to send batch msg, batch size:%d, msgLen:%d, reason:%s", CONN_GET_INST_LABEL(conn), conn,
|
tDebug("%p conn %p failed to send batch msg, batch size:%d, msgLen:%d, reason:%s", CONN_GET_INST_LABEL(conn), conn,
|
||||||
conn->pBatch->wLen, conn->pBatch->batchSize, uv_err_name(status));
|
p->wLen, p->batchSize, uv_err_name(status));
|
||||||
cliHandleExcept(conn);
|
cliHandleExcept(conn);
|
||||||
} else {
|
} else {
|
||||||
tDebug("%p conn %p succ to send batch msg, batch size:%d, msgLen:%d", CONN_GET_INST_LABEL(conn), conn,
|
tDebug("%p conn %p succ to send batch msg, batch size:%d, msgLen:%d", CONN_GET_INST_LABEL(conn), conn, p->wLen,
|
||||||
conn->pBatch->wLen, conn->pBatch->batchSize);
|
p->batchSize);
|
||||||
addConnToPool(thrd->pool, conn);
|
addConnToPool(thrd->pool, conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cliDestroyBatch(p);
|
||||||
|
taosMemoryFree(req);
|
||||||
}
|
}
|
||||||
static void cliHandleFastFail(SCliConn* pConn, int status) {
|
static void cliHandleFastFail(SCliConn* pConn, int status) {
|
||||||
SCliThrd* pThrd = pConn->hostThrd;
|
SCliThrd* pThrd = pConn->hostThrd;
|
||||||
|
|
Loading…
Reference in New Issue