fix:remove debug info

This commit is contained in:
wangmm0220 2023-12-06 15:46:45 +08:00
parent 82f54f094a
commit f4b0e7baf5
3 changed files with 5 additions and 18 deletions

View File

@ -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 \

View File

@ -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;
}

View File

@ -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),