support query db size

This commit is contained in:
yihaoDeng 2024-08-02 10:31:28 +08:00
parent 444d277cc3
commit 9ddb6d1393
2 changed files with 7 additions and 1 deletions

View File

@ -442,7 +442,8 @@ static const SSysDbTableSchema usageSchema[] = {
{.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 = "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[] = {

View File

@ -1956,6 +1956,11 @@ static SSDataBlock* sysTableBuildVgUsage(SOperatorInfo* pOperator) {
totalSize += walSize;
int64_t timeserial = 100000;
pColInfoData = taosArrayGet(p->pDataBlock, numOfCols++);
code = colDataSetVal(pColInfoData, numOfRows, (char*)&timeserial, false); // totoal size
QUERY_CHECK_CODE(code, lino, _end);
numOfRows +=1;
pAPI->metaFn.closeTableMetaCursor(pInfo->pCur);
pInfo->pCur = NULL;