From cf8e2dc6f9def5a5529c549a40ad1ded3a4f1a55 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 5 Aug 2024 09:50:08 +0800 Subject: [PATCH] add debug log --- source/common/src/systable.c | 4 +--- source/libs/executor/src/sysscanoperator.c | 15 +++------------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 82da6b1a03..3be7c26253 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -436,14 +436,12 @@ static const SSysDbTableSchema usageSchema[] = { {.name = "db_name", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, {.name = "vgroup_id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = true}, {.name = "wal_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, - {.name = "memtable_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, + {.name = "mem_rows_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, {.name = "level1_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, {.name = "level2_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, {.name = "level3_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, {.name = "s3_size",.bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, {.name = "estimated_row_data_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, - {.name = "total_size", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, - {.name = "timeseries", .bytes = 8, .type = TSDB_DATA_TYPE_BIGINT, .sysInfo = true}, }; static const SSysTableMeta infosMeta[] = { diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 6aa42ef36d..6773781639 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -1898,8 +1898,9 @@ static SSDataBlock* sysTableBuildVgUsage(SOperatorInfo* pOperator) { int64_t walSize = 1024, totalSize = 0; int32_t numOfCols = 0; - SColumnInfoData* pColInfoData = taosArrayGet(p->pDataBlock, numOfCols++); - pColInfoData = taosArrayGet(p->pDataBlock, 0); + //SColumnInfoData* pColInfoData = taosArrayGet(p->pDataBlock, numOfCols++); + + SColumnInfoData *pColInfoData = taosArrayGet(p->pDataBlock, numOfCols++); code = colDataSetVal(pColInfoData, numOfRows, dbname, false); QUERY_CHECK_CODE(code, lino, _end); @@ -1948,16 +1949,6 @@ static SSDataBlock* sysTableBuildVgUsage(SOperatorInfo* pOperator) { QUERY_CHECK_CODE(code, lino, _end); totalSize += walSize; - pColInfoData = taosArrayGet(p->pDataBlock, numOfCols++); - code = colDataSetVal(pColInfoData, numOfRows, (char*)&totalSize, false); // totoal size - QUERY_CHECK_CODE(code, lino, _end); - totalSize += walSize; - - int64_t timeserial = 100000; - pColInfoData = taosArrayGet(p->pDataBlock, numOfCols++); - code = colDataSetVal(pColInfoData, numOfRows, (char*)×erial, false); // total size - QUERY_CHECK_CODE(code, lino, _end); - numOfRows += 1; pAPI->metaFn.closeTableMetaCursor(pInfo->pCur); pInfo->pCur = NULL;