diff --git a/source/dnode/vnode/src/vnd/vnodeWrite.c b/source/dnode/vnode/src/vnd/vnodeWrite.c index dcdc03adf6666f79d4e2375f34449cd5df2de430..a6c3f25c6f0fcbe4653c9534a92601c246f2e42f 100644 --- a/source/dnode/vnode/src/vnd/vnodeWrite.c +++ b/source/dnode/vnode/src/vnd/vnodeWrite.c @@ -96,7 +96,7 @@ int vnodeApplyWMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) { } } - vDebug("vgId:%d process create %"PRIzu" tables", pVnode->vgId, taosArrayGetSize(vCreateTbBatchReq.pArray)); + vTrace("vgId:%d process create %" PRIzu " tables", pVnode->vgId, taosArrayGetSize(vCreateTbBatchReq.pArray)); taosArrayDestroy(vCreateTbBatchReq.pArray); break; @@ -131,6 +131,7 @@ int vnodeApplyWMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) { // TODO: handle error } } + return 0; } diff --git a/source/libs/scheduler/src/scheduler.c b/source/libs/scheduler/src/scheduler.c index 747446a6ba3362827dfdfd989f57befc9d48b5fe..f31a27cb422ae1f260dbedfd715678983ce812d0 100644 --- a/source/libs/scheduler/src/scheduler.c +++ b/source/libs/scheduler/src/scheduler.c @@ -734,7 +734,7 @@ int32_t schProcessOnTaskSuccess(SSchJob *pJob, SSchTask *pTask) { SCH_UNLOCK(SCH_WRITE, &pTask->level->lock); if (taskDone < pTask->level->taskNum) { - SCH_TASK_ELOG("wait all tasks, done:%d, all:%d", taskDone, pTask->level->taskNum); + SCH_TASK_DLOG("wait all tasks, done:%d, all:%d", taskDone, pTask->level->taskNum); return TSDB_CODE_SUCCESS; } else if (taskDone > pTask->level->taskNum) { diff --git a/tests/script/sh/deploy.sh b/tests/script/sh/deploy.sh index e00363b28f3b3e43c096e9ce3485a8932bb0426d..3e8f87d66508da1170da43c1ae014373e2341eb6 100755 --- a/tests/script/sh/deploy.sh +++ b/tests/script/sh/deploy.sh @@ -115,6 +115,8 @@ elif [ $NODE -eq 8 ]; then NODE=7800 fi +HOSTNAME=localhost + echo " " >> $TAOS_CFG echo "firstEp ${HOSTNAME}:7100" >> $TAOS_CFG echo "secondEp ${HOSTNAME}:7200" >> $TAOS_CFG diff --git a/tests/test/c/create_table.c b/tests/test/c/create_table.c index 74dd3f453537905131d2cfee5551624bd5b62f25..fddf3e7f2a4ca9c1dd7434544b4ff209e1521352 100644 --- a/tests/test/c/create_table.c +++ b/tests/test/c/create_table.c @@ -35,8 +35,7 @@ int32_t numOfVgroups = 2; int32_t showTablesFlag = 0; int32_t queryFlag = 0; -int64_t startTimestamp = 1640966400000; // 2020-01-01 00:00:00.000 - +int64_t startTimestamp = 1640966400000; // 2020-01-01 00:00:00.000 typedef struct { int64_t tableBeginIndex; @@ -89,7 +88,7 @@ void createDbAndStb() { pRes = taos_query(con, qstr); code = taos_errno(pRes); if (code != 0) { - pError("failed to use db, code:%d reason:%s", taos_errno(pRes), taos_errstr(pRes)); + pError("failed to create stable, code:%d reason:%s", taos_errno(pRes), taos_errstr(pRes)); exit(0); } taos_free_result(pRes); @@ -182,18 +181,14 @@ void *threadFunc(void *param) { exit(1); } - pPrint("====before thread:%d, table range: %"PRId64 " - %"PRId64 "\n", - pInfo->threadIndex, - pInfo->tableBeginIndex, - pInfo->tableEndIndex); + pPrint("====before thread:%d, table range: %" PRId64 " - %" PRId64 "\n", pInfo->threadIndex, pInfo->tableBeginIndex, + pInfo->tableEndIndex); pInfo->tableBeginIndex += startOffset; - pInfo->tableEndIndex += startOffset; + pInfo->tableEndIndex += startOffset; - pPrint("====after thread:%d, table range: %"PRId64 " - %"PRId64 "\n", - pInfo->threadIndex, - pInfo->tableBeginIndex, - pInfo->tableEndIndex); + pPrint("====after thread:%d, table range: %" PRId64 " - %" PRId64 "\n", pInfo->threadIndex, pInfo->tableBeginIndex, + pInfo->tableEndIndex); sprintf(qstr, "use %s", pInfo->dbName); TAOS_RES *pRes = taos_query(con, qstr); @@ -221,7 +216,7 @@ void *threadFunc(void *param) { int64_t startTs = taosGetTimestampUs(); TAOS_RES *pRes = taos_query(con, qstr); code = taos_errno(pRes); - if ((code != 0) && (code != TSDB_CODE_RPC_AUTH_REQUIRED)) { + if (code != 0) { pError("failed to create table reason:%s, sql: %s", tstrerror(code), qstr); } taos_free_result(pRes); @@ -251,20 +246,20 @@ void *threadFunc(void *param) { // batch = MIN(batch, batchNum); int32_t len = sprintf(qstr, "insert into "); - + for (int32_t i = 0; i < batchNumOfTbl;) { - int64_t ts = startTimestamp; + int64_t ts = startTimestamp; len += sprintf(qstr + len, "%s_t%" PRId64 " values ", stbName, t); for (int32_t j = 0; j < batchNumOfRow; j++) { - len += sprintf(qstr + len, "(%" PRId64 ", 6666) ", ts++); + len += sprintf(qstr + len, "(%" PRId64 ", 6666) ", ts++); } - + t++; i++; if (t > pInfo->tableEndIndex) { break; } - } + } int64_t startTs = taosGetTimestampUs(); TAOS_RES *pRes = taos_query(con, qstr); @@ -360,7 +355,7 @@ void parseArgument(int32_t argc, char *argv[]) { } else if (strcmp(argv[i], "-q") == 0) { queryFlag = atoi(argv[++i]); } else { - pPrint("%s unknow para: %s %s", GREEN, argv[++i], NC); + pPrint("%s unknow para: %s %s", GREEN, argv[++i], NC); } } @@ -390,15 +385,16 @@ int32_t main(int32_t argc, char *argv[]) { } if (queryFlag) { - //selectRowsFromTable(); + // selectRowsFromTable(); return 0; } if (createTable) { createDbAndStb(); } - - pPrint("%d threads are spawned to create %" PRId64 " tables, offset is %" PRId64 " ", numOfThreads, numOfTables, startOffset); + + pPrint("%d threads are spawned to create %" PRId64 " tables, offset is %" PRId64 " ", numOfThreads, numOfTables, + startOffset); pthread_attr_t thattr; pthread_attr_init(&thattr); @@ -456,8 +452,8 @@ int32_t main(int32_t argc, char *argv[]) { if (createTable) { pPrint("%s total %" PRId64 " tables, %.1f tables/second, threads:%d, maxDelay: %" PRId64 "us, minDelay: %" PRId64 - "us %s", - GREEN, numOfTables, createTableSpeed, numOfThreads, maxDelay, minDelay, NC); + "us %s", + GREEN, numOfTables, createTableSpeed, numOfThreads, maxDelay, minDelay, NC); } if (insertData) { diff --git a/tests/tsim/src/simSystem.c b/tests/tsim/src/simSystem.c index 016b6500ed381c06bb5b155d165518acccc5bcf6..6b6392c1be3a903d90e21a8db3a4ec4529c525ec 100644 --- a/tests/tsim/src/simSystem.c +++ b/tests/tsim/src/simSystem.c @@ -42,7 +42,8 @@ char *simParseArbitratorName(char *varName) { char *simParseHostName(char *varName) { static char hostName[140]; - sprintf(hostName, "%s", simHostName); + //sprintf(hostName, "%s", simHostName); + sprintf(hostName, "%s", "localhost"); return hostName; }