diff --git a/src/connector/jdbc/CMakeLists.txt b/src/connector/jdbc/CMakeLists.txt index b14bb2dc181a05f0269e51527472ee79a491071a..b91ebcd38fe19045b10007f5bb546a48c30ebb88 100644 --- a/src/connector/jdbc/CMakeLists.txt +++ b/src/connector/jdbc/CMakeLists.txt @@ -8,7 +8,7 @@ IF (TD_MVN_INSTALLED) ADD_CUSTOM_COMMAND(OUTPUT ${JDBC_CMD_NAME} POST_BUILD COMMAND mvn -Dmaven.test.skip=true install -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/target/taos-jdbcdriver*dist.* ${EXECUTABLE_OUTPUT_PATH}/../lib/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/target/taos-jdbcdriver-1.0.1-dist.jar ${LIBRARY_OUTPUT_PATH} COMMAND mvn -Dmaven.test.skip=true clean -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml COMMENT "build jdbc driver") ADD_CUSTOM_TARGET(${JDBC_TARGET_NAME} ALL WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} DEPENDS ${JDBC_CMD_NAME}) diff --git a/src/inc/tglobalcfg.h b/src/inc/tglobalcfg.h index ae56b61fa5469445a293eb26745ae82a99b6e588..9fb9fb0ce07fe4d8c84df627ddfda17ba41ce01b 100644 --- a/src/inc/tglobalcfg.h +++ b/src/inc/tglobalcfg.h @@ -178,6 +178,7 @@ void tsInitGlobalConfig(); #define TSDB_CFG_CTYPE_B_LOG 4 // is a log type configuration #define TSDB_CFG_CTYPE_B_CLIENT 8 // can be displayed in the client log #define TSDB_CFG_CTYPE_B_OPTION 16 // can be configured by taos_options function +#define TSDB_CFG_CTYPE_B_NOT_PRINT 32 #define TSDB_CFG_CSTATUS_NONE 0 // not configured #define TSDB_CFG_CSTATUS_DEFAULT 1 // use system default value diff --git a/src/modules/http/src/httpServer.c b/src/modules/http/src/httpServer.c index 16c4b968fd9fd04c7d381494cf762b3f24000119..5d1f3b64fc9fda3a81d6c3faf7caafd59ca2ae2f 100644 --- a/src/modules/http/src/httpServer.c +++ b/src/modules/http/src/httpServer.c @@ -269,20 +269,6 @@ void httpCleanUpConnect(HttpServer *pServer) { httpTrace("http server:%s is cleaned up", pServer->label); } -void httpCloseDeadConnects(HttpThread *pThread) { - int32_t thresholdSec = taosGetTimestampSec() - 3600; - HttpContext *pContext = (HttpContext*)pThread->pHead; - while (pContext != NULL && pContext == pContext->signature) { - HttpContext *pContextNext = pContext->next; - if (pContext->lastAccessTime < thresholdSec) { - httpPrint("context:%p, fd:%d, ip:%s, lastAccessTime:%d smaller then threshold:%d, so close it", - pContext, pContext->fd, pContext->ipstr, pContext->lastAccessTime, thresholdSec); - httpCloseContextByServer(pThread, pContext); - } - pContext = pContextNext; - } -} - // read all the data, then just discard it void httpReadDirtyData(int fd) { char data[1024] = {0}; @@ -486,7 +472,6 @@ void httpAcceptHttpConnection(void *arg) { struct sockaddr_in clientAddr; int sockFd; int threadId = 0; - const int connThreshold = 2 * tsHttpCacheSessions / tsHttpMaxThreads; HttpThread * pThread; HttpServer * pServer; HttpContext * pContext; @@ -570,9 +555,6 @@ void httpAcceptHttpConnection(void *arg) { pContext, connFd, inet_ntoa(clientAddr.sin_addr), htons(clientAddr.sin_port), pThread->label, pThread->numOfFds); - if (pThread->numOfFds > connThreshold) { - httpCloseDeadConnects(pThread); - } // pick up next thread for next connection threadId++; threadId = threadId % pServer->numOfThreads; diff --git a/src/util/src/tglobalcfg.c b/src/util/src/tglobalcfg.c index c8b1507f2cd330cf4e9ba8e0ca5635c5231f2984..481f8e5082ea74aa18c1c8da709ce2bf589ae14a 100644 --- a/src/util/src/tglobalcfg.c +++ b/src/util/src/tglobalcfg.c @@ -483,7 +483,7 @@ void tsInitGlobalConfig() { tsInitConfigOption(cfg++, "defaultUser", tsDefaultUser, TSDB_CFG_VTYPE_STRING, TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT, 0, 0, TSDB_USER_LEN, TSDB_CFG_UTYPE_NONE); tsInitConfigOption(cfg++, "defaultPass", tsDefaultPass, TSDB_CFG_VTYPE_STRING, - TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT, 0, 0, TSDB_PASSWORD_LEN, TSDB_CFG_UTYPE_NONE); + TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT | TSDB_CFG_CTYPE_B_NOT_PRINT, 0, 0, TSDB_PASSWORD_LEN, TSDB_CFG_UTYPE_NONE); // locale & charset tsInitConfigOption(cfg++, "timezone", tsTimezone, TSDB_CFG_VTYPE_STRING, @@ -754,6 +754,7 @@ void tsPrintGlobalConfig() { for (int i = 0; i < tsGlobalConfigNum; ++i) { SGlobalConfig *cfg = tsGlobalConfig + i; if (tscEmbedded == 0 && !(cfg->cfgType & TSDB_CFG_CTYPE_B_CLIENT)) continue; + if (cfg->cfgType & TSDB_CFG_CTYPE_B_NOT_PRINT) continue; int optionLen = (int)strlen(cfg->option); int blankLen = TSDB_CFG_PRINT_LEN - optionLen;