diff --git a/src/balance/src/bnMain.c b/src/balance/src/bnMain.c index 236b22afafb9ed6ee13acfaf6b831520f2b4d2f6..3055f77e81021c4877d97147033fc34f4c525df9 100644 --- a/src/balance/src/bnMain.c +++ b/src/balance/src/bnMain.c @@ -425,7 +425,7 @@ static bool bnMonitorVgroups() { while (1) { pIter = mnodeGetNextVgroup(pIter, &pVgroup); - if (pVgroup == NULL) break; + if (pVgroup == NULL || pVgroup->pDb == NULL) break; int32_t dbReplica = pVgroup->pDb->cfg.replications; int32_t vgReplica = pVgroup->numOfVnodes; @@ -721,4 +721,4 @@ int32_t bnAlterDnode(struct SDnodeObj *pSrcDnode, int32_t vnodeId, int32_t dnode mnodeDecDnodeRef(pDestDnode); return code; -} \ No newline at end of file +}