From 026d0b499bd8d4685876e0ad3bc9d987b51de541 Mon Sep 17 00:00:00 2001 From: slguan Date: Fri, 22 Nov 2019 14:18:41 +0800 Subject: [PATCH] [TBASE-1128] --- src/modules/http/src/httpServer.c | 4 ++-- src/modules/http/src/httpSystem.c | 2 +- src/modules/monitor/src/monitorSystem.c | 4 ++-- src/rpc/src/tudp.c | 3 ++- src/system/detail/src/dnodeSystem.c | 2 ++ src/system/detail/src/vnodeCommit.c | 2 +- src/system/detail/src/vnodeShell.c | 2 +- src/system/lite/src/dnodeMgmt.spec.c | 2 ++ 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/modules/http/src/httpServer.c b/src/modules/http/src/httpServer.c index 333b770a5f..01d3ef40f2 100644 --- a/src/modules/http/src/httpServer.c +++ b/src/modules/http/src/httpServer.c @@ -527,8 +527,8 @@ void httpAcceptHttpConnection(void *arg) { totalFds += pServer->pThreads[i].numOfFds; } - if (totalFds > tsHttpCacheSessions * 20) { - httpError("fd:%d, ip:%s:%u, totalFds:%d larger than httpCacheSessions:%d*20, refuse connection", + if (totalFds > tsHttpCacheSessions * 100) { + httpError("fd:%d, ip:%s:%u, totalFds:%d larger than httpCacheSessions:%d*100, refuse connection", connFd, inet_ntoa(clientAddr.sin_addr), htons(clientAddr.sin_port), totalFds, tsHttpCacheSessions); taosCloseSocket(connFd); continue; diff --git a/src/modules/http/src/httpSystem.c b/src/modules/http/src/httpSystem.c index 93d2b1d2cd..25ab55aed9 100644 --- a/src/modules/http/src/httpSystem.c +++ b/src/modules/http/src/httpSystem.c @@ -89,7 +89,7 @@ int httpStartSystem() { } if (httpServer->timerHandle == NULL) { - httpServer->timerHandle = taosTmrInit(tsHttpCacheSessions * 20 + 100, 200, 60000, "http"); + httpServer->timerHandle = taosTmrInit(tsHttpCacheSessions * 100 + 100, 200, 60000, "http"); } if (httpServer->timerHandle == NULL) { httpError("http init timer failed"); diff --git a/src/modules/monitor/src/monitorSystem.c b/src/modules/monitor/src/monitorSystem.c index 4d6577c8f3..4a8d17cda6 100644 --- a/src/modules/monitor/src/monitorSystem.c +++ b/src/modules/monitor/src/monitorSystem.c @@ -246,9 +246,9 @@ void monitorStopSystem() { } #ifdef CLUSTER - monitorLPrint("dnode:%s is stopped", tsPrivateIp); + monitorLPrint("dnode:%s monitor module is stopped", tsPrivateIp); #else - monitorLPrint("dnode:%s is stopped", tsInternalIp); + monitorLPrint("dnode:%s monitor module is stopped", tsInternalIp); #endif monitor->state = MONITOR_STATE_STOPPED; taosLogFp = NULL; diff --git a/src/rpc/src/tudp.c b/src/rpc/src/tudp.c index 7a4961f90c..58a893f074 100644 --- a/src/rpc/src/tudp.c +++ b/src/rpc/src/tudp.c @@ -506,6 +506,8 @@ void *taosInitUdpConnection(char *ip, short port, char *label, int threads, void pConn->localPort = (int16_t)ntohs(sin.sin_port); } + strcpy(pConn->label, label); + if (pthread_create(&pConn->thread, &thAttr, taosRecvUdpData, pConn) != 0) { tError("%s failed to create thread to process UDP data, reason:%s", label, strerror(errno)); taosCloseSocket(pConn->fd); @@ -513,7 +515,6 @@ void *taosInitUdpConnection(char *ip, short port, char *label, int threads, void return NULL; } - strcpy(pConn->label, label); pConn->shandle = shandle; pConn->processData = fp; pConn->index = i; diff --git a/src/system/detail/src/dnodeSystem.c b/src/system/detail/src/dnodeSystem.c index 8815a8f42d..05a7bef486 100644 --- a/src/system/detail/src/dnodeSystem.c +++ b/src/system/detail/src/dnodeSystem.c @@ -136,6 +136,8 @@ int dnodeInitSystem() { return -1; } + vnodeInitMgmtIp(); + tsPrintGlobalConfig(); dPrint("Server IP address is:%s", tsInternalIp); diff --git a/src/system/detail/src/vnodeCommit.c b/src/system/detail/src/vnodeCommit.c index 73c891f7bb..70c4cfe280 100644 --- a/src/system/detail/src/vnodeCommit.c +++ b/src/system/detail/src/vnodeCommit.c @@ -235,7 +235,7 @@ int vnodeInitCommit(int vnode) { } pVnode->pWrite += size; - dTrace("vid:%d, commit log is initialized", vnode); + dPrint("vid:%d, commit log is initialized", vnode); return 0; } diff --git a/src/system/detail/src/vnodeShell.c b/src/system/detail/src/vnodeShell.c index 9000a7df78..d39fda8042 100644 --- a/src/system/detail/src/vnodeShell.c +++ b/src/system/detail/src/vnodeShell.c @@ -178,7 +178,7 @@ int vnodeOpenShellVnode(int vnode) { return -1; } - dTrace("vid:%d, sessions:%d, shell is opened", vnode, pCfg->maxSessions); + dPrint("vid:%d, sessions:%d, shell is opened", vnode, pCfg->maxSessions); return TSDB_CODE_SUCCESS; } diff --git a/src/system/lite/src/dnodeMgmt.spec.c b/src/system/lite/src/dnodeMgmt.spec.c index 6c424a85af..e40b21ab83 100644 --- a/src/system/lite/src/dnodeMgmt.spec.c +++ b/src/system/lite/src/dnodeMgmt.spec.c @@ -90,4 +90,6 @@ void vnodeProcessMsgFromMgmtSpec(SSchedMsg *sched) { int vnodeInitMgmt() { return 0; } +void vnodeInitMgmtIp() {} + int vnodeSaveCreateMsgIntoQueue(SVnodeObj *pVnode, char *pMsg, int msgLen) { return 0; } \ No newline at end of file -- GitLab