From ef3d5b935926771d92890f6d05d3cc95d312fbca Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 30 Jul 2020 03:48:22 +0000 Subject: [PATCH] [TD-1025] change ip list while vgroup master changed --- src/mnode/src/mnodeVgroup.c | 2 +- tests/test/c/createTablePerformance.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mnode/src/mnodeVgroup.c b/src/mnode/src/mnodeVgroup.c index 1d1a101270..91aa3fdec2 100644 --- a/src/mnode/src/mnodeVgroup.c +++ b/src/mnode/src/mnodeVgroup.c @@ -818,7 +818,7 @@ static SMDCreateVnodeMsg *mnodeBuildVnodeMsg(SVgObj *pVgroup) { SRpcEpSet mnodeGetEpSetFromVgroup(SVgObj *pVgroup) { SRpcEpSet epSet = { .numOfEps = pVgroup->numOfVnodes, - .inUse = 0, + .inUse = pVgroup->inUse, }; for (int i = 0; i < pVgroup->numOfVnodes; ++i) { strcpy(epSet.fqdn[i], pVgroup->vnodeGid[i].pDnode->dnodeFqdn); diff --git a/tests/test/c/createTablePerformance.c b/tests/test/c/createTablePerformance.c index 2e334fa9b2..69022bdecf 100644 --- a/tests/test/c/createTablePerformance.c +++ b/tests/test/c/createTablePerformance.c @@ -31,7 +31,6 @@ char dbName[32] = "db"; char stableName[64] = "st"; int32_t numOfThreads = 30; int32_t numOfTables = 100000; -int32_t maxTables = 5000; int32_t replica = 1; int32_t numOfColumns = 2; @@ -98,7 +97,7 @@ void createDbAndSTable() { exit(1); } - sprintf(qstr, "create database if not exists %s maxtables %d replica %d", dbName, maxTables, replica); + sprintf(qstr, "create database if not exists %s replica %d", dbName, replica); TAOS_RES *pSql = taos_query(con, qstr); int32_t code = taos_errno(pSql); if (code != 0) { @@ -195,8 +194,6 @@ void printHelp() { printf("%s%s%s%d\n", indent, indent, "replica, default is ", replica); printf("%s%s\n", indent, "-columns"); printf("%s%s%s%d\n", indent, indent, "numOfColumns, default is ", numOfColumns); - printf("%s%s\n", indent, "-tables"); - printf("%s%s%s%d\n", indent, indent, "Database parameters tables, default is ", maxTables); exit(EXIT_SUCCESS); } @@ -218,8 +215,6 @@ void shellParseArgument(int argc, char *argv[]) { numOfTables = atoi(argv[++i]); } else if (strcmp(argv[i], "-r") == 0) { replica = atoi(argv[++i]); - } else if (strcmp(argv[i], "-tables") == 0) { - maxTables = atoi(argv[++i]); } else if (strcmp(argv[i], "-columns") == 0) { numOfColumns = atoi(argv[++i]); } else { @@ -233,7 +228,6 @@ void shellParseArgument(int argc, char *argv[]) { pPrint("%s numOfThreads:%d %s", GREEN, numOfThreads, NC); pPrint("%s numOfColumns:%d %s", GREEN, numOfColumns, NC); pPrint("%s replica:%d %s", GREEN, replica, NC); - pPrint("%s dbPara maxTables:%d %s", GREEN, maxTables, NC); pPrint("%s start create table performace test %s", GREEN, NC); } -- GitLab