change paramter
This commit is contained in:
parent
aff649deb7
commit
0611ecbe31
|
@ -131,7 +131,7 @@ STscObj* taos_connect_internal(const char* ip, const char* user, const char* pas
|
|||
p = taosMemoryCalloc(1, sizeof(struct SAppInstInfo));
|
||||
p->mgmtEp = epSet;
|
||||
taosThreadMutexInit(&p->qnodeMutex, NULL);
|
||||
p->pTransporter = openTransporter(user, secretEncrypt, tsNumOfCores);
|
||||
p->pTransporter = openTransporter(user, secretEncrypt, tsNumOfCores / 2);
|
||||
p->pAppHbMgr = appHbMgrInit(p, key);
|
||||
if (NULL == p->pAppHbMgr) {
|
||||
destroyAppInst(p);
|
||||
|
|
|
@ -250,7 +250,7 @@ int32_t dmInitClient(SDnode *pDnode) {
|
|||
|
||||
SRpcInit rpcInit = {0};
|
||||
rpcInit.label = "DND-C";
|
||||
rpcInit.numOfThreads = 4;
|
||||
rpcInit.numOfThreads = tsNumOfRpcThreads;
|
||||
rpcInit.cfp = (RpcCfp)dmProcessRpcMsg;
|
||||
rpcInit.sessions = 1024;
|
||||
rpcInit.connType = TAOS_CONN_CLIENT;
|
||||
|
|
|
@ -653,9 +653,10 @@ static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {
|
|||
static SCliConn* cliCreateConn(SCliThrd* pThrd) {
|
||||
SCliConn* conn = taosMemoryCalloc(1, sizeof(SCliConn));
|
||||
// read/write stream handle
|
||||
conn->stream = (uv_stream_t*)taosMemoryMalloc(sizeof(uv_tcp_t));
|
||||
conn->stream = (uv_stream_t*)taosMemoryMalloc(sizeof(uv_stream_t));
|
||||
uv_tcp_init(pThrd->loop, (uv_tcp_t*)(conn->stream));
|
||||
conn->stream->data = conn;
|
||||
transSetConnOption((uv_tcp_t*)conn->stream);
|
||||
|
||||
uv_timer_t* timer = taosArrayGetSize(pThrd->timerList) > 0 ? *(uv_timer_t**)taosArrayPop(pThrd->timerList) : NULL;
|
||||
if (timer == NULL) {
|
||||
|
@ -1182,7 +1183,7 @@ bool cliRecvReleaseReq(SCliConn* conn, STransMsgHead* pHead) {
|
|||
static void* cliWorkThread(void* arg) {
|
||||
SCliThrd* pThrd = (SCliThrd*)arg;
|
||||
pThrd->pid = taosGetSelfPthreadId();
|
||||
setThreadName("trans-cli-work");
|
||||
setThreadName("trans-cli-worker");
|
||||
uv_run(pThrd->loop, UV_RUN_DEFAULT);
|
||||
|
||||
tDebug("thread quit-thread:%08" PRId64, pThrd->pid);
|
||||
|
|
|
@ -202,7 +202,7 @@ bool transReadComplete(SConnBuffer* connBuf) {
|
|||
}
|
||||
|
||||
int transSetConnOption(uv_tcp_t* stream) {
|
||||
uv_tcp_nodelay(stream, 0);
|
||||
uv_tcp_nodelay(stream, 1);
|
||||
int ret = uv_tcp_keepalive(stream, 5, 60);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -846,7 +846,7 @@ static bool addHandleToAcceptloop(void* arg) {
|
|||
return true;
|
||||
}
|
||||
void* transWorkerThread(void* arg) {
|
||||
setThreadName("trans-srv-work");
|
||||
setThreadName("trans-svr-worker");
|
||||
SWorkThrd* pThrd = (SWorkThrd*)arg;
|
||||
uv_run(pThrd->loop, UV_RUN_DEFAULT);
|
||||
|
||||
|
|
Loading…
Reference in New Issue