From 06ee018eebaf51d46038058c96dc3ca484695be2 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 28 Feb 2021 16:40:17 +0000 Subject: [PATCH 1/4] [TD-3114] : refine centos environment package list --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ded262b674..9c5caab55c 100644 --- a/README.md +++ b/README.md @@ -57,9 +57,7 @@ sudo apt-get install -y maven ### Centos 7: ```bash -sudo yum install -y gcc gcc-c++ make cmake3 epel-release git -sudo yum remove -y cmake -sudo ln -s /usr/bin/cmake3 /usr/bin/cmake +sudo yum install -y gcc gcc-c++ make cmake git ``` To install openjdk-8: From f3fd9e6f9b27c2caebfbeb1c4c817fc2ac40b73a Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 1 Mar 2021 11:23:50 +0800 Subject: [PATCH 2/4] TD-3115 --- src/client/src/tscSystem.c | 4 +--- src/rpc/src/rpcMain.c | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index 4da922dadd..bd79f81846 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -83,7 +83,7 @@ int32_t tscAcquireRpc(const char *key, const char *user, const char *secretEncry memset(&rpcInit, 0, sizeof(rpcInit)); rpcInit.localPort = 0; rpcInit.label = "TSC"; - rpcInit.numOfThreads = tscNumOfThreads * 2; + rpcInit.numOfThreads = tscNumOfThreads; rpcInit.cfp = tscProcessMsgFromServer; rpcInit.sessions = tsMaxConnections; rpcInit.connType = TAOS_CONN_CLIENT; @@ -159,8 +159,6 @@ void taos_init_imp(void) { if (tscNumOfThreads < 2) { tscNumOfThreads = 2; } - taosTmrThreads = tscNumOfThreads; - tscQhandle = taosInitScheduler(queueSize, tscNumOfThreads, "tsc"); if (NULL == tscQhandle) { tscError("failed to init scheduler"); diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 17b80a0afb..6d34c9fb15 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -246,8 +246,12 @@ void *rpcOpen(const SRpcInit *pInit) { if(pInit->label) tstrncpy(pRpc->label, pInit->label, sizeof(pRpc->label)); pRpc->connType = pInit->connType; + if (pRpc->connType == TAOS_CONN_CLIENT) { + pRpc->numOfThreads = pInit->numOfThreads; + } else { + pRpc->numOfThreads = pInit->numOfThreads>TSDB_MAX_RPC_THREADS ? TSDB_MAX_RPC_THREADS:pInit->numOfThreads; + } pRpc->idleTime = pInit->idleTime; - pRpc->numOfThreads = pInit->numOfThreads>TSDB_MAX_RPC_THREADS ? TSDB_MAX_RPC_THREADS:pInit->numOfThreads; pRpc->localPort = pInit->localPort; pRpc->afp = pInit->afp; pRpc->sessions = pInit->sessions+1; From b8da478552f61677d37aa39c9cbce3c3550d3e68 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Mon, 1 Mar 2021 14:14:41 +0800 Subject: [PATCH 3/4] [TD-3120] add only create table, but no insert data --- src/kit/taosdemo/taosdemo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index b9ccef652f..7cd9a35a8a 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -3072,9 +3072,9 @@ static bool getMetaFromInsertJsonFile(cJSON* root) { cJSON* insertRows = cJSON_GetObjectItem(stbInfo, "insert_rows"); if (insertRows && insertRows->type == cJSON_Number) { g_Dbs.db[i].superTbls[j].insertRows = insertRows->valueint; - if (0 == g_Dbs.db[i].superTbls[j].insertRows) { - g_Dbs.db[i].superTbls[j].insertRows = 0x7FFFFFFFFFFFFFFF; - } + //if (0 == g_Dbs.db[i].superTbls[j].insertRows) { + // g_Dbs.db[i].superTbls[j].insertRows = 0x7FFFFFFFFFFFFFFF; + //} } else if (!insertRows) { g_Dbs.db[i].superTbls[j].insertRows = 0x7FFFFFFFFFFFFFFF; } else { @@ -4481,6 +4481,9 @@ int insertTestProcess() { for (int i = 0; i < g_Dbs.dbCount; i++) { for (int j = 0; j < g_Dbs.db[i].superTblCount; j++) { SSuperTable* superTblInfo = &g_Dbs.db[i].superTbls[j]; + if (0 == g_Dbs.db[i].superTbls[j].insertRows) { + continue; + } startMultiThreadInsertData(g_Dbs.threadCount, g_Dbs.db[i].dbName, g_Dbs.db[i].dbCfg.precision, superTblInfo); } } From 2d07eef4c027f24348d960ed777ec797d8985dcf Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 1 Mar 2021 17:13:01 +0800 Subject: [PATCH 4/4] [TD-3117] : fix taosdemo coredump led by cntDelay. --- src/kit/taosdemo/taosdemo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 7cd9a35a8a..0db4b118d7 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -4271,7 +4271,7 @@ void startMultiThreadInsertData(int threads, char* db_name, char* precision, SSu } cntDelay -= 1; - assert(cntDelay != 0); + if (cntDelay == 0) cntDelay = 1; avgDelay = (double)totalDelay / cntDelay; double end = getCurrentTime();