From 8167303e72966038b5356ff31be9f4842c981de1 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 3 Sep 2024 09:42:22 +0800 Subject: [PATCH 01/12] fix: fix super table query only have some child return --- src/benchUtil.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/benchUtil.c b/src/benchUtil.c index f7fb55ddd..17222201f 100644 --- a/src/benchUtil.c +++ b/src/benchUtil.c @@ -102,12 +102,19 @@ void resetAfterAnsiEscape(void) { FORCE_INLINE unsigned int taosRandom() { return (unsigned int)rand(); } #endif +void swapItem(char** names, int32_t i, int32_t j ) { + debugPrint("swap item i=%d (%s) j=%d (%s)\n", i, j, names[i], names[j]); + char * p = names[i]; + names[i] = names[j]; + names[j] = p; +} + int getAllChildNameOfSuperTable(TAOS *taos, char *dbName, char *stbName, char ** childTblNameOfSuperTbl, int64_t childTblCountOfSuperTbl) { char cmd[SHORT_1K_SQL_BUFF_LEN] = "\0"; snprintf(cmd, SHORT_1K_SQL_BUFF_LEN, - "select tbname from %s.`%s` limit %" PRId64 "", + "select distinct tbname from %s.`%s` limit %" PRId64 "", dbName, stbName, childTblCountOfSuperTbl); TAOS_RES *res = taos_query(taos, cmd); int32_t code = taos_errno(res); @@ -135,6 +142,16 @@ int getAllChildNameOfSuperTable(TAOS *taos, char *dbName, char *stbName, count++; } taos_free_result(res); + + // random swap order + if (count < 4) { + return 0; + } + + for(int32_t i = 0; i < count/2; i++ ) { + int32_t j = i + taosRandom(count/2); + swapItem(childTblNameOfSuperTbl, i, j); + } return 0; } From 447b0c0e872bc6c4ce7a45355ac6303a6ebd9d8f Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 3 Sep 2024 09:47:09 +0800 Subject: [PATCH 02/12] fix: build error --- src/benchUtil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/benchUtil.c b/src/benchUtil.c index 17222201f..cd1c62c01 100644 --- a/src/benchUtil.c +++ b/src/benchUtil.c @@ -103,7 +103,7 @@ FORCE_INLINE unsigned int taosRandom() { return (unsigned int)rand(); } #endif void swapItem(char** names, int32_t i, int32_t j ) { - debugPrint("swap item i=%d (%s) j=%d (%s)\n", i, j, names[i], names[j]); + debugPrint("swap item i=%d (%s) j=%d (%s)\n", i, names[i], j, names[j]); char * p = names[i]; names[i] = names[j]; names[j] = p; @@ -149,7 +149,7 @@ int getAllChildNameOfSuperTable(TAOS *taos, char *dbName, char *stbName, } for(int32_t i = 0; i < count/2; i++ ) { - int32_t j = i + taosRandom(count/2); + int32_t j = i + RD(count/2); swapItem(childTblNameOfSuperTbl, i, j); } return 0; From 8d24bd368e9a590f148cf0039d99e4873a655595 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 3 Sep 2024 10:00:03 +0800 Subject: [PATCH 03/12] fix: change swap range --- src/benchUtil.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/benchUtil.c b/src/benchUtil.c index cd1c62c01..cce536826 100644 --- a/src/benchUtil.c +++ b/src/benchUtil.c @@ -148,8 +148,9 @@ int getAllChildNameOfSuperTable(TAOS *taos, char *dbName, char *stbName, return 0; } - for(int32_t i = 0; i < count/2; i++ ) { - int32_t j = i + RD(count/2); + int32_t swapCnt = count/2; + for(int32_t i = 0; i < swapCnt; i++ ) { + int32_t j = swapCnt + RD(swapCnt); swapItem(childTblNameOfSuperTbl, i, j); } return 0; From 55751e48738a517dd6da7cecf7037c4b4e594574 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 3 Sep 2024 11:02:10 +0800 Subject: [PATCH 04/12] fix: add some debug info --- src/benchQuery.c | 1 + src/benchUtil.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/benchQuery.c b/src/benchQuery.c index 03a930d1d..4649ad32c 100644 --- a/src/benchQuery.c +++ b/src/benchQuery.c @@ -40,6 +40,7 @@ int selectAndGetResult(threadInfo *pThreadInfo, char *command) { threadID, dbName); ret = -2; } else { + debugPrint("query sql:%s\n", command); TAOS_RES *res = taos_query(taos, command); int code = taos_errno(res); if (res == NULL || code) { diff --git a/src/benchUtil.c b/src/benchUtil.c index cce536826..d0f3ab14f 100644 --- a/src/benchUtil.c +++ b/src/benchUtil.c @@ -819,8 +819,10 @@ void fetchResult(TAOS_RES *res, threadInfo *pThreadInfo) { int num_fields = 0; int64_t totalLen = 0; TAOS_FIELD *fields = 0; + int64_t rows = 0; char *databuf = NULL; bool toFile = strlen(pThreadInfo->filePath) > 0; + if(toFile) { num_fields = taos_field_count(res); @@ -842,12 +844,14 @@ void fetchResult(TAOS_RES *res, threadInfo *pThreadInfo) { char temp[HEAD_BUFF_LEN] = {0}; int len = taos_print_row(temp, row, fields, num_fields); len += snprintf(temp + len, HEAD_BUFF_LEN - len, "\n"); - debugPrint("query result:%s\n", temp); + //debugPrint("query result:%s\n", temp); memcpy(databuf + totalLen, temp, len); totalLen += len; } + rows ++; //if not toFile , only loop call taos_fetch_row } + debugPrint("query finished. rows :%"PRId64"\n", rows); // end if (toFile) { From d21dac5ca2f588267d40b61016e3b115908c8454 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 3 Sep 2024 11:07:45 +0800 Subject: [PATCH 05/12] fix: adjust debuginfo --- inc/bench.h | 2 +- src/benchQuery.c | 5 +++-- src/benchUtil.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/inc/bench.h b/inc/bench.h index b2c9b0807..b0b559d8a 100644 --- a/inc/bench.h +++ b/inc/bench.h @@ -1095,7 +1095,7 @@ int convertStringToDatatype(char *type, int length); unsigned int taosRandom(); void tmfree(void *buf); void tmfclose(FILE *fp); -void fetchResult(TAOS_RES *res, threadInfo *pThreadInfo); +int64_t fetchResult(TAOS_RES *res, threadInfo *pThreadInfo); void prompt(bool NonStopMode); void ERROR_EXIT(const char *msg); int getServerVersionRest(int16_t rest_port); diff --git a/src/benchQuery.c b/src/benchQuery.c index 4649ad32c..620fb740a 100644 --- a/src/benchQuery.c +++ b/src/benchQuery.c @@ -40,7 +40,7 @@ int selectAndGetResult(threadInfo *pThreadInfo, char *command) { threadID, dbName); ret = -2; } else { - debugPrint("query sql:%s\n", command); + int64_t rows = 0; TAOS_RES *res = taos_query(taos, command); int code = taos_errno(res); if (res == NULL || code) { @@ -56,10 +56,11 @@ int selectAndGetResult(threadInfo *pThreadInfo, char *command) { } } else { //if (strlen(pThreadInfo->filePath) > 0) { - fetchResult(res, pThreadInfo); + rows = fetchResult(res, pThreadInfo); //} } taos_free_result(res); + debugPrint("query sql:%s rows:%"PRId64"\n", command, rows); } } return ret; diff --git a/src/benchUtil.c b/src/benchUtil.c index d0f3ab14f..e5fa65f49 100644 --- a/src/benchUtil.c +++ b/src/benchUtil.c @@ -814,7 +814,7 @@ int postProceSql(char *sqlstr, char* dbName, int precision, int iface, } // fetch result fo file or nothing -void fetchResult(TAOS_RES *res, threadInfo *pThreadInfo) { +int64_t fetchResult(TAOS_RES *res, threadInfo *pThreadInfo) { TAOS_ROW row = NULL; int num_fields = 0; int64_t totalLen = 0; @@ -851,13 +851,13 @@ void fetchResult(TAOS_RES *res, threadInfo *pThreadInfo) { rows ++; //if not toFile , only loop call taos_fetch_row } - debugPrint("query finished. rows :%"PRId64"\n", rows); // end if (toFile) { appendResultBufToFile(databuf, pThreadInfo->filePath); free(databuf); } + return rows; } char *convertDatatypeToString(int type) { From 5f2a4ff4c3b1922669058973458e2c6c5cc95df6 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 3 Sep 2024 11:13:07 +0800 Subject: [PATCH 06/12] fix: adjust debuginfo --- src/benchQuery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/benchQuery.c b/src/benchQuery.c index 620fb740a..2b930c7d1 100644 --- a/src/benchQuery.c +++ b/src/benchQuery.c @@ -430,9 +430,9 @@ static int multi_thread_specified_table_query(uint16_t iface, char* dbName) { // check invaid if(nSqlCount == 0 || nConcurrent == 0 ) { if(nSqlCount == 0) - infoPrint(" query sql count is %" PRIu64 ". must set query sqls. \n", nSqlCount); + warnPrint(" specified table query sql count is %" PRIu64 ".\n", nSqlCount); if(nConcurrent == 0) - infoPrint(" concurrent is %d , specified_table_query->concurrent must not zero. \n", nConcurrent); + warnPrint(" concurrent is %d , specified_table_query->concurrent is zero. \n", nConcurrent); return 0; } From 00a4bdde54f6446109cdc14f1f9f287cf0597bbf Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 3 Sep 2024 11:14:55 +0800 Subject: [PATCH 07/12] fix: adjust debuginfo --- src/benchQuery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/benchQuery.c b/src/benchQuery.c index 2b930c7d1..d2e20c941 100644 --- a/src/benchQuery.c +++ b/src/benchQuery.c @@ -430,9 +430,9 @@ static int multi_thread_specified_table_query(uint16_t iface, char* dbName) { // check invaid if(nSqlCount == 0 || nConcurrent == 0 ) { if(nSqlCount == 0) - warnPrint(" specified table query sql count is %" PRIu64 ".\n", nSqlCount); + warnPrint("specified table query sql count is %" PRIu64 ".\n", nSqlCount); if(nConcurrent == 0) - warnPrint(" concurrent is %d , specified_table_query->concurrent is zero. \n", nConcurrent); + warnPrint("concurrent is %d , specified_table_query->concurrent is zero. \n", nConcurrent); return 0; } From 76b75e680198401e2d686d10ed650583d05cba06 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Sun, 8 Sep 2024 11:24:02 +0800 Subject: [PATCH 08/12] fix: now replace with local time in interlace=1 mode --- src/benchInsert.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/benchInsert.c b/src/benchInsert.c index 148f89137..689bec7cc 100644 --- a/src/benchInsert.c +++ b/src/benchInsert.c @@ -1772,7 +1772,8 @@ static void *syncWriteInterlace(void *sarg) { // timestamp char time_string[BIGINT_BUFF_LEN]; if(stbInfo->useNow && stbInfo->interlaceRows == 1 && !fillBack) { - snprintf(time_string, BIGINT_BUFF_LEN, "now"); + int64_t now = toolsGetTimestamp(database->precision); + snprintf(time_string, BIGINT_BUFF_LEN, "%"PRId64"", now); } else { snprintf(time_string, BIGINT_BUFF_LEN, "%"PRId64"", disorderTs?disorderTs:childTbl->ts); From 49e2a56aa05e1ca003fb147e5123b93e038f0840 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Fri, 20 Sep 2024 14:29:36 +0800 Subject: [PATCH 09/12] feat: support new websocket api --- src/benchUtil.c | 2 +- src/taosdump.c | 70 ++++++++++++++++++++++++------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/benchUtil.c b/src/benchUtil.c index e5fa65f49..44fd060e4 100644 --- a/src/benchUtil.c +++ b/src/benchUtil.c @@ -291,7 +291,7 @@ SBenchConn* initBenchConnImpl() { SBenchConn* conn = benchCalloc(1, sizeof(SBenchConn), true); #ifdef WEBSOCKET if (g_arguments->websocket) { - conn->taos_ws = ws_connect_with_dsn(g_arguments->dsn); + conn->taos_ws = ws_connect(g_arguments->dsn); char maskedDsn[256] = "\0"; memcpy(maskedDsn, g_arguments->dsn, 20); memcpy(maskedDsn+20, "...", 3); diff --git a/src/taosdump.c b/src/taosdump.c index 17cd00890..a8f5f37a9 100644 --- a/src/taosdump.c +++ b/src/taosdump.c @@ -1389,7 +1389,7 @@ TAOS *taosConnect(const char *dbName) { #ifdef WEBSOCKET WS_TAOS *wsConnect() { - WS_TAOS *ws_taos = ws_connect_with_dsn(g_args.dsn); + WS_TAOS *ws_taos = ws_connect(g_args.dsn); if (NULL == ws_taos) { char maskedDsn[256] = "\0"; memcpy(maskedDsn, g_args.dsn, 20); @@ -1483,9 +1483,9 @@ static int getTableRecordInfoImplWS( while (true) { int rows = 0; const void *data = NULL; - code = ws_fetch_block(ws_res, &data, &rows); + code = ws_fetch_raw_block(ws_res, &data, &rows); if (code) { - errorPrint("%s() LN%d, ws_fetch_block() error. reason: %s!\n", + errorPrint("%s() LN%d, ws_fetch_raw_block() error. reason: %s!\n", __func__, __LINE__, ws_errstr(ws_res)); ws_free_result(ws_res); @@ -1822,9 +1822,9 @@ static int getDbCountWS(WS_RES *ws_res) { while (true) { int rows = 0; const void *data = NULL; - code = ws_fetch_block(ws_res, &data, &rows); + code = ws_fetch_raw_block(ws_res, &data, &rows); if (code) { - errorPrint("%s() LN%d, ws_fetch_block() error. reason: %s!\n", + errorPrint("%s() LN%d, ws_fetch_raw_block() error. reason: %s!\n", __func__, __LINE__, ws_errstr(ws_res)); return 0; @@ -2102,9 +2102,9 @@ static int64_t getNtbCountOfStbWS(char* dbName, const char* stbName) { while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -2607,10 +2607,10 @@ static int getTableTagValueWSV3( while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (ws_code) { - errorPrint("%s() LN%d, ws_fetch_block() error, " + errorPrint("%s() LN%d, ws_fetch_raw_block() error, " "code: 0x%08x, command: %s, reason: %s\n", __func__, __LINE__, ws_code, command, ws_errstr(ws_res)); } @@ -2695,10 +2695,10 @@ static int getTableTagValueWSV2( while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (ws_code) { - errorPrint("%s() LN%d, ws_fetch_block() error, " + errorPrint("%s() LN%d, ws_fetch_raw_block() error, " "code: 0x%08x, sqlstr: %s, reason: %s\n", __func__, __LINE__, ws_code, sqlstr, ws_errstr(ws_res)); } @@ -2813,9 +2813,9 @@ static int getTableDesWS( while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -4562,9 +4562,9 @@ int64_t queryDbForDumpOutCountWS( while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -5056,10 +5056,10 @@ static int64_t writeResultToAvroWS( while (true) { int rows = 0; const void *data = NULL; - int32_t ws_code = ws_fetch_block(ws_res, &data, &rows); + int32_t ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (ws_code) { - errorPrint("%s() LN%d, ws_fetch_blocK() error, ws_taos: %p, " + errorPrint("%s() LN%d, ws_fetch_raw_block() error, ws_taos: %p, " "code: 0x%08x, reason: %s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -5067,7 +5067,7 @@ static int64_t writeResultToAvroWS( } if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -8055,17 +8055,17 @@ static int64_t writeResultDebugWS( while (true) { int rows = 0; const void *data = NULL; - int32_t ws_code = ws_fetch_block(ws_res, &data, &rows); + int32_t ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (ws_code) { - errorPrint("%s() LN%d, ws_fetch_blocK() error!" + errorPrint("%s() LN%d, ws_fetch_raw_block() error!" " code: 0x%08x, reason: %s\n", __func__, __LINE__, ws_code, ws_errstr(ws_res)); break; } if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_errno(ws_res), ws_errstr(ws_res)); @@ -9375,10 +9375,10 @@ static int64_t fillTbNameArrWS( while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -9965,10 +9965,10 @@ int readNextTableDesWS(void* ws_res, TableDes* tbDes, int *idx, int *cnt) { // get block if(*idx >= *cnt || *cnt == 0) { const void *data = NULL; - int ws_code = ws_fetch_block(ws_res, &data, cnt); + int ws_code = ws_fetch_raw_block(ws_res, &data, cnt); if (ws_code !=0 ) { // read to end - errorPrint("read next ws_fetch_block failed, err code=%d idx=%d index=%d\n", ws_code, *idx, index); + errorPrint("read next ws_fetch_raw_block failed, err code=%d idx=%d index=%d\n", ws_code, *idx, index); return -1; } @@ -10498,10 +10498,10 @@ static void dumpExtraInfoVarWS(void *taos, FILE *fp) { while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -11713,10 +11713,10 @@ static int64_t dumpStbAndChildTbOfDbWS( while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -11820,10 +11820,10 @@ static int64_t dumpNTablesOfDbWS(WS_TAOS *ws_taos, SDbInfo *dbInfo) { while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -12641,10 +12641,10 @@ static int fillDbExtraInfoV3WS( while (true) { int rows = 0; const void *data = NULL; - ws_code = ws_fetch_block(ws_res, &data, &rows); + ws_code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, ws_taos, ws_errno(ws_res), ws_errstr(ws_res)); @@ -12714,10 +12714,10 @@ static int fillDbInfoWS(void *taos) { while (true) { int rows = 0; const void *data = NULL; - code = ws_fetch_block(ws_res, &data, &rows); + code = ws_fetch_raw_block(ws_res, &data, &rows); if (0 == rows) { - debugPrint("%s() LN%d, No more data from ws_fetch_block(), " + debugPrint("%s() LN%d, No more data from ws_fetch_raw_block(), " "ws_taos: %p, code: 0x%08x, reason:%s\n", __func__, __LINE__, taos, ws_errno(ws_res), ws_errstr(ws_res)); From c70f91270d8ee2017d92fa41b51cbc52a4f6d76d Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Fri, 20 Sep 2024 16:14:57 +0800 Subject: [PATCH 10/12] fix: ws_enable_log(debug) --- src/benchMain.c | 2 +- src/taosdump.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/benchMain.c b/src/benchMain.c index 015b60c9a..f951044f8 100644 --- a/src/benchMain.c +++ b/src/benchMain.c @@ -86,7 +86,7 @@ int main(int argc, char* argv[]) { } #ifdef WEBSOCKET if (g_arguments->debug_print) { - ws_enable_log(); + ws_enable_log("debug"); } if (g_arguments->dsn != NULL) { diff --git a/src/taosdump.c b/src/taosdump.c index a8f5f37a9..50e0a13ff 100644 --- a/src/taosdump.c +++ b/src/taosdump.c @@ -13253,7 +13253,7 @@ static int dumpEntry() { #ifdef WEBSOCKET if (g_args.verbose_print) { - ws_enable_log(); + ws_enable_log(“debug”); } if (NULL == g_args.dsn) { g_args.dsn = getenv("TDENGINE_CLOUD_DSN"); From a738a0af0c00197aab6a3a8fc2b42be8e12d556f Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Fri, 20 Sep 2024 17:12:33 +0800 Subject: [PATCH 11/12] fix: adjust ws_enable_log level to info --- src/benchMain.c | 2 +- src/taosdump.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/benchMain.c b/src/benchMain.c index f951044f8..3cfa66bf2 100644 --- a/src/benchMain.c +++ b/src/benchMain.c @@ -86,7 +86,7 @@ int main(int argc, char* argv[]) { } #ifdef WEBSOCKET if (g_arguments->debug_print) { - ws_enable_log("debug"); + ws_enable_log("info"); } if (g_arguments->dsn != NULL) { diff --git a/src/taosdump.c b/src/taosdump.c index 50e0a13ff..a05614073 100644 --- a/src/taosdump.c +++ b/src/taosdump.c @@ -13253,7 +13253,7 @@ static int dumpEntry() { #ifdef WEBSOCKET if (g_args.verbose_print) { - ws_enable_log(“debug”); + ws_enable_log(“info”); } if (NULL == g_args.dsn) { g_args.dsn = getenv("TDENGINE_CLOUD_DSN"); From 04deea86b69ee4d844a8e965d6166e39198d4ea1 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Fri, 20 Sep 2024 18:41:07 +0800 Subject: [PATCH 12/12] fix: ws_enable_log info --- src/taosdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taosdump.c b/src/taosdump.c index a05614073..66d4016b5 100644 --- a/src/taosdump.c +++ b/src/taosdump.c @@ -13253,7 +13253,7 @@ static int dumpEntry() { #ifdef WEBSOCKET if (g_args.verbose_print) { - ws_enable_log(“info”); + ws_enable_log("info"); } if (NULL == g_args.dsn) { g_args.dsn = getenv("TDENGINE_CLOUD_DSN");