From f4b0e7baf520f90e6bf10e744ab3ca6d4e3b118f Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 6 Dec 2023 15:46:45 +0800 Subject: [PATCH] fix:remove debug info --- source/client/inc/clientSml.h | 1 - source/client/src/clientSml.c | 19 +++++-------------- source/client/src/clientSmlLine.c | 3 --- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/source/client/inc/clientSml.h b/source/client/inc/clientSml.h index 0a5b91e039..30d4792279 100644 --- a/source/client/inc/clientSml.h +++ b/source/client/inc/clientSml.h @@ -199,7 +199,6 @@ typedef struct { STableMeta *currSTableMeta; STableDataCxt *currTableDataCtx; bool needModifySchema; - SArray *parseTimeList; } SSmlHandle; #define IS_SAME_CHILD_TABLE (elements->measureTagsLen == info->preLine.measureTagsLen \ diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 46e88b4a00..6bcaae3bf0 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1261,7 +1261,6 @@ void smlDestroyInfo(SSmlHandle *info) { taosArrayDestroy(info->valueJsonArray); taosArrayDestroyEx(info->preLineTagKV, freeSSmlKv); - taosArrayDestroy(info->parseTimeList); if (!info->dataFormat) { for (int i = 0; i < info->lineNum; i++) { @@ -1310,7 +1309,6 @@ SSmlHandle *smlBuildSmlInfo(TAOS *taos) { info->tagJsonArray = taosArrayInit(8, POINTER_BYTES); info->valueJsonArray = taosArrayInit(8, POINTER_BYTES); info->preLineTagKV = taosArrayInit(8, sizeof(SSmlKv)); - info->parseTimeList = taosArrayInit(8, LONG_BYTES); if (NULL == info->pVgHash || NULL == info->childTables || NULL == info->superTables || NULL == info->tableUids) { uError("create SSmlHandle failed"); @@ -1525,22 +1523,15 @@ static int32_t smlInsertData(SSmlHandle *info) { } static void smlPrintStatisticInfo(SSmlHandle *info) { - char parseTimeStr[102400] = {0}; - char* tmp = parseTimeStr; - for(int i = 0; i < taosArrayGetSize(info->parseTimeList); i++){ - int64_t *t = (int64_t *)taosArrayGet(info->parseTimeList, i); - tmp += sprintf(tmp, ":%d", (int32_t)(*t)); - } - uError( + uDebug( "SML:0x%" PRIx64 " smlInsertLines result, code:%d, msg:%s, lineNum:%d,stable num:%d,ctable num:%d,create stable num:%d,alter stable tag num:%d,alter stable col num:%d \ - parse cost:%" PRId64 ",schema cost:%" PRId64 ",bind cost:%" PRId64 ",rpc cost:%" PRId64 ",total cost:%" PRId64 - ", parList:%s", + parse cost:%" PRId64 ",schema cost:%" PRId64 ",bind cost:%" PRId64 ",rpc cost:%" PRId64 ",total cost:%" PRId64, info->id, info->cost.code, tstrerror(info->cost.code), info->cost.lineNum, info->cost.numOfSTables, info->cost.numOfCTables, info->cost.numOfCreateSTables, info->cost.numOfAlterTagSTables, info->cost.numOfAlterColSTables, info->cost.schemaTime - info->cost.parseTime, info->cost.insertBindTime - info->cost.schemaTime, info->cost.insertRpcTime - info->cost.insertBindTime, - info->cost.endTime - info->cost.insertRpcTime, info->cost.endTime - info->cost.parseTime, parseTimeStr); + info->cost.endTime - info->cost.insertRpcTime, info->cost.endTime - info->cost.parseTime); } @@ -1583,7 +1574,7 @@ int32_t smlClearForRerun(SSmlHandle *info) { } static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char *rawLineEnd, int numLines) { - uError("SML:0x%" PRIx64 " smlParseLine start", info->id); + uDebug("SML:0x%" PRIx64 " smlParseLine start", info->id); int32_t code = TSDB_CODE_SUCCESS; if (info->protocol == TSDB_SML_JSON_PROTOCOL) { if (lines) { @@ -1656,7 +1647,7 @@ static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char } i++; } - uError("SML:0x%" PRIx64 " smlParseLine end", info->id); + uDebug("SML:0x%" PRIx64 " smlParseLine end", info->id); return code; } diff --git a/source/client/src/clientSmlLine.c b/source/client/src/clientSmlLine.c index 91dd6ea700..7ad43d90c7 100644 --- a/source/client/src/clientSmlLine.c +++ b/source/client/src/clientSmlLine.c @@ -632,7 +632,6 @@ int32_t smlParseInfluxString(SSmlHandle *info, char *sql, char *sqlEnd, SSmlLine JUMP_SPACE(sql, sqlEnd) if (unlikely(*sql == COMMA)) return TSDB_CODE_SML_INVALID_DATA; elements->measure = sql; - int64_t t1 = taosGetTimestampUs(); // parse measure size_t measureLenEscaped = 0; while (sql < sqlEnd) { @@ -725,8 +724,6 @@ int32_t smlParseInfluxString(SSmlHandle *info, char *sql, char *sqlEnd, SSmlLine uError("SML:0x%" PRIx64 " smlParseTS error:%" PRId64, info->id, ts); return TSDB_CODE_INVALID_TIMESTAMP; } - int64_t t2 = taosGetTimestampUs() - t1; - taosArrayPush(info->parseTimeList, &t2); // add ts to SSmlKv kv = {.key = tsSmlTsDefaultName, .keyLen = strlen(tsSmlTsDefaultName),