提交 d22e97d2 编写于 作者: dengyihao's avatar dengyihao

fix invalid code

上级 3de71e39
......@@ -284,9 +284,9 @@ int32_t dmInitClient(SDnode *pDnode) {
rpcInit.failFastThreshold = 3; // failed threshold
rpcInit.ffp = dmFailFastFp;
int32_t connLimitNum = 30000 / (tsNumOfRpcThreads * 3);
connLimitNum = TMAX(connLimitNum, 500);
connLimitNum = TMIN(connLimitNum, 1000);
int32_t connLimitNum = 10000 / (tsNumOfRpcThreads * 3);
connLimitNum = TMAX(connLimitNum, 100);
connLimitNum = TMIN(connLimitNum, 600);
rpcInit.connLimitNum = connLimitNum;
rpcInit.connLimitLock = 1;
......
......@@ -1070,22 +1070,24 @@ static void cliHandleBatchReq(SCliBatch* pBatch, SCliThrd* pThrd) {
cliSendBatch(conn);
}
static void cliSendBatchCb(uv_write_t* req, int status) {
SCliConn* conn = req->data;
taosMemoryFree(req);
SCliConn* conn = req->data;
SCliThrd* thrd = conn->hostThrd;
SCliBatch* p = conn->pBatch;
SCliThrd* thrd = conn->hostThrd;
cliDestroyBatch(conn->pBatch);
conn->pBatch = NULL;
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,
conn->pBatch->wLen, conn->pBatch->batchSize, uv_err_name(status));
p->wLen, p->batchSize, uv_err_name(status));
cliHandleExcept(conn);
} else {
tDebug("%p conn %p succ to send batch msg, batch size:%d, msgLen:%d", CONN_GET_INST_LABEL(conn), conn,
conn->pBatch->wLen, conn->pBatch->batchSize);
tDebug("%p conn %p succ to send batch msg, batch size:%d, msgLen:%d", CONN_GET_INST_LABEL(conn), conn, p->wLen,
p->batchSize);
addConnToPool(thrd->pool, conn);
}
cliDestroyBatch(p);
taosMemoryFree(req);
}
static void cliHandleFastFail(SCliConn* pConn, int status) {
SCliThrd* pThrd = pConn->hostThrd;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册