From 29166b24a918f5808acf4320b980dfd9111664cf Mon Sep 17 00:00:00 2001 From: slguan Date: Sat, 21 Dec 2019 17:09:36 +0800 Subject: [PATCH] [TBASE-1387] #992 --- src/system/detail/src/mgmtDnode.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/system/detail/src/mgmtDnode.c b/src/system/detail/src/mgmtDnode.c index 8ab8cc13ba..0504c1174b 100644 --- a/src/system/detail/src/mgmtDnode.c +++ b/src/system/detail/src/mgmtDnode.c @@ -435,10 +435,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); -- GitLab