[TBASE-1387] #992

This commit is contained in:
slguan 2019-12-21 17:09:36 +08:00
parent bba2bbf1ab
commit 29166b24a9
1 changed files with 10 additions and 3 deletions

View File

@ -436,9 +436,16 @@ int mgmtGetVnodeMeta(SMeterMeta *pMeta, SShowObj *pShow, SConnObj *pConn) {
return TSDB_CODE_NODE_OFFLINE;
}
pShow->numOfRows = pDnode->openVnodes;
pShow->pNode = pDnode;
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->pNode = pDnode;
} else {
while (true) {
pShow->pNode = mgmtGetNextDnode(pShow, (SDnodeObj **)&pDnode);