fix:remove debug info
This commit is contained in:
parent
82f54f094a
commit
f4b0e7baf5
|
@ -199,7 +199,6 @@ typedef struct {
|
||||||
STableMeta *currSTableMeta;
|
STableMeta *currSTableMeta;
|
||||||
STableDataCxt *currTableDataCtx;
|
STableDataCxt *currTableDataCtx;
|
||||||
bool needModifySchema;
|
bool needModifySchema;
|
||||||
SArray *parseTimeList;
|
|
||||||
} SSmlHandle;
|
} SSmlHandle;
|
||||||
|
|
||||||
#define IS_SAME_CHILD_TABLE (elements->measureTagsLen == info->preLine.measureTagsLen \
|
#define IS_SAME_CHILD_TABLE (elements->measureTagsLen == info->preLine.measureTagsLen \
|
||||||
|
|
|
@ -1261,7 +1261,6 @@ void smlDestroyInfo(SSmlHandle *info) {
|
||||||
taosArrayDestroy(info->valueJsonArray);
|
taosArrayDestroy(info->valueJsonArray);
|
||||||
|
|
||||||
taosArrayDestroyEx(info->preLineTagKV, freeSSmlKv);
|
taosArrayDestroyEx(info->preLineTagKV, freeSSmlKv);
|
||||||
taosArrayDestroy(info->parseTimeList);
|
|
||||||
|
|
||||||
if (!info->dataFormat) {
|
if (!info->dataFormat) {
|
||||||
for (int i = 0; i < info->lineNum; i++) {
|
for (int i = 0; i < info->lineNum; i++) {
|
||||||
|
@ -1310,7 +1309,6 @@ SSmlHandle *smlBuildSmlInfo(TAOS *taos) {
|
||||||
info->tagJsonArray = taosArrayInit(8, POINTER_BYTES);
|
info->tagJsonArray = taosArrayInit(8, POINTER_BYTES);
|
||||||
info->valueJsonArray = taosArrayInit(8, POINTER_BYTES);
|
info->valueJsonArray = taosArrayInit(8, POINTER_BYTES);
|
||||||
info->preLineTagKV = taosArrayInit(8, sizeof(SSmlKv));
|
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) {
|
if (NULL == info->pVgHash || NULL == info->childTables || NULL == info->superTables || NULL == info->tableUids) {
|
||||||
uError("create SSmlHandle failed");
|
uError("create SSmlHandle failed");
|
||||||
|
@ -1525,22 +1523,15 @@ static int32_t smlInsertData(SSmlHandle *info) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void smlPrintStatisticInfo(SSmlHandle *info) {
|
static void smlPrintStatisticInfo(SSmlHandle *info) {
|
||||||
char parseTimeStr[102400] = {0};
|
uDebug(
|
||||||
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(
|
|
||||||
"SML:0x%" PRIx64
|
"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 \
|
" 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
|
parse cost:%" PRId64 ",schema cost:%" PRId64 ",bind cost:%" PRId64 ",rpc cost:%" PRId64 ",total cost:%" PRId64,
|
||||||
", parList:%s",
|
|
||||||
info->id, info->cost.code, tstrerror(info->cost.code), info->cost.lineNum, info->cost.numOfSTables,
|
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.numOfCTables, info->cost.numOfCreateSTables, info->cost.numOfAlterTagSTables,
|
||||||
info->cost.numOfAlterColSTables, info->cost.schemaTime - info->cost.parseTime,
|
info->cost.numOfAlterColSTables, info->cost.schemaTime - info->cost.parseTime,
|
||||||
info->cost.insertBindTime - info->cost.schemaTime, info->cost.insertRpcTime - info->cost.insertBindTime,
|
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) {
|
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;
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
if (info->protocol == TSDB_SML_JSON_PROTOCOL) {
|
if (info->protocol == TSDB_SML_JSON_PROTOCOL) {
|
||||||
if (lines) {
|
if (lines) {
|
||||||
|
@ -1656,7 +1647,7 @@ static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
uError("SML:0x%" PRIx64 " smlParseLine end", info->id);
|
uDebug("SML:0x%" PRIx64 " smlParseLine end", info->id);
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
|
@ -632,7 +632,6 @@ int32_t smlParseInfluxString(SSmlHandle *info, char *sql, char *sqlEnd, SSmlLine
|
||||||
JUMP_SPACE(sql, sqlEnd)
|
JUMP_SPACE(sql, sqlEnd)
|
||||||
if (unlikely(*sql == COMMA)) return TSDB_CODE_SML_INVALID_DATA;
|
if (unlikely(*sql == COMMA)) return TSDB_CODE_SML_INVALID_DATA;
|
||||||
elements->measure = sql;
|
elements->measure = sql;
|
||||||
int64_t t1 = taosGetTimestampUs();
|
|
||||||
// parse measure
|
// parse measure
|
||||||
size_t measureLenEscaped = 0;
|
size_t measureLenEscaped = 0;
|
||||||
while (sql < sqlEnd) {
|
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);
|
uError("SML:0x%" PRIx64 " smlParseTS error:%" PRId64, info->id, ts);
|
||||||
return TSDB_CODE_INVALID_TIMESTAMP;
|
return TSDB_CODE_INVALID_TIMESTAMP;
|
||||||
}
|
}
|
||||||
int64_t t2 = taosGetTimestampUs() - t1;
|
|
||||||
taosArrayPush(info->parseTimeList, &t2);
|
|
||||||
// add ts to
|
// add ts to
|
||||||
SSmlKv kv = {.key = tsSmlTsDefaultName,
|
SSmlKv kv = {.key = tsSmlTsDefaultName,
|
||||||
.keyLen = strlen(tsSmlTsDefaultName),
|
.keyLen = strlen(tsSmlTsDefaultName),
|
||||||
|
|
Loading…
Reference in New Issue