diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 49d8f84d3806c6e97c901de062a2af55e49a9cc9..b7f8721459ff329a4536ed36687a48f5b7bc84e1 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -23,8 +23,6 @@ extern "C" { #include "tdef.h" // common -extern int32_t tsMaxConnections; -extern int32_t tsMaxShellConns; extern int32_t tsShellActivityTimer; extern uint32_t tsMaxTmrCtrl; extern float tsNumOfThreadsPerCore; diff --git a/source/client/src/clientCfg.c b/source/client/src/clientCfg.c index ca671ab150620b4be66c15699a6ad906cfd3cbd1..22b1407a15691a9424ca1e769c563586762513ac 100644 --- a/source/client/src/clientCfg.c +++ b/source/client/src/clientCfg.c @@ -159,8 +159,9 @@ static int32_t tscAddCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "statusInterval", 1, 1, 30) != 0) return -1; if (cfgAddFloat(pCfg, "numOfThreadsPerCore", 1, 0, 10) != 0) return -1; if (cfgAddFloat(pCfg, "ratioOfQueryCores", 1, 0, 5) != 0) return -1; - if (cfgAddInt32(pCfg, "maxShellConns", 50000, 10, 50000000) != 0) return -1; if (cfgAddInt32(pCfg, "shellActivityTimer", 3, 1, 120) != 0) return -1; + + if (cfgAddInt32(pCfg, "maxConnections", 50000, 1, 100000) != 0) return -1; return 0; } diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index c7640e90d8a0e81b6fe4c46ccabf0ce9a590034d..37227cea6f595497e043441bd123f86b34576d98 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -90,7 +90,7 @@ void* openTransporter(const char *user, const char *auth, int32_t numOfThread) { rpcInit.label = "TSC"; rpcInit.numOfThreads = numOfThread; rpcInit.cfp = processMsgFromServer; - rpcInit.sessions = tsMaxConnections; + rpcInit.sessions = cfgGetItem(tscCfg, "maxConnections")->i32; rpcInit.connType = TAOS_CONN_CLIENT; rpcInit.user = (char *)user; rpcInit.idleTime = tsShellActivityTimer * 1000; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 0042239e1aa07c32090bcf6687e70b0a3108902a..f9f00fa9a30b4cdb3519a7f4638914180c36e525 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -29,8 +29,6 @@ // common -int32_t tsMaxShellConns = 50000; -int32_t tsMaxConnections = 50000; int32_t tsShellActivityTimer = 3; // second float tsNumOfThreadsPerCore = 1.0f; int32_t tsNumOfCommitThreads = 4; @@ -440,16 +438,6 @@ static void doInitGlobalConfig(void) { taosAddConfigOption(cfg); - cfg.option = "maxConnections"; - cfg.ptr = &tsMaxConnections; - cfg.valType = TAOS_CFG_VTYPE_INT32; - cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW; - cfg.minValue = 1; - cfg.maxValue = 100000; - cfg.ptrLength = 0; - cfg.unitType = TAOS_CFG_UTYPE_NONE; - taosAddConfigOption(cfg); - cfg.option = "minimalLogDirGB"; cfg.ptr = &tsMinimalLogDirGB; cfg.valType = TAOS_CFG_VTYPE_FLOAT; diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 5508b5ecd713016a4d228a7087d34faaadddc38f..b35ce9e7c37f67186cbcf8819cbef793221d8456 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -5301,7 +5301,7 @@ SOperatorInfo* createExchangeOperatorInfo(const SArray* pSources, const SArray* rpcInit.label = "EX"; rpcInit.numOfThreads = 1; rpcInit.cfp = qProcessFetchRsp; - rpcInit.sessions = tsMaxConnections; + rpcInit.sessions = 50000; //tsMaxConnections; rpcInit.connType = TAOS_CONN_CLIENT; rpcInit.user = (char *)"root"; rpcInit.idleTime = tsShellActivityTimer * 1000; diff --git a/source/libs/qcom/src/queryUtil.c b/source/libs/qcom/src/queryUtil.c index 4cd040c238931cb228ffcc4ebb6fb1fd3e781f17..9b381ad82375fb5b1a3b90e87a1f42f343a5bc19 100644 --- a/source/libs/qcom/src/queryUtil.c +++ b/source/libs/qcom/src/queryUtil.c @@ -87,7 +87,7 @@ int32_t initTaskQueue() { double factor = 4.0; int32_t numOfThreads = TMAX((int)(tsNumOfCores * tsNumOfThreadsPerCore / factor), 2); - int32_t queueSize = tsMaxConnections * 2; + int32_t queueSize = 25000; //tsMaxConnections * 2; pTaskQueue = taosInitScheduler(queueSize, numOfThreads, "tsc"); if (NULL == pTaskQueue) { qError("failed to init task queue");