diff --git a/src/system/detail/src/mgmtDnode.c b/src/system/detail/src/mgmtDnode.c index 2c96b9a3c0e99a4d014bd981a0f2cdd9fddab596..4066dd766996b6e63f9226e4df2f27cebae2738b 100644 --- a/src/system/detail/src/mgmtDnode.c +++ b/src/system/detail/src/mgmtDnode.c @@ -434,10 +434,17 @@ int mgmtGetVnodeMeta(SMeterMeta *pMeta, SShowObj *pShow, SConnObj *pConn) { if (NULL == pDnode) { return TSDB_CODE_NODE_OFFLINE; } + + SVnodeLoad* pVnode; + pShow->numOfRows = 0; + for (int i = 0 ; i < TSDB_MAX_VNODES; i++) { + pVnode = &pDnode->vload[i]; + if (0 != pVnode->vgId) { + pShow->numOfRows++; + } + } - pShow->numOfRows = pDnode->openVnodes; - pShow->pNode = pDnode; - + pShow->pNode = pDnode; } else { while (true) { pShow->pNode = mgmtGetNextDnode(pShow, (SDnodeObj **)&pDnode);