From 811bd5d2f2a266831c45a472f0b90dde9da9cadb Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 21 Jun 2020 02:44:15 +0000 Subject: [PATCH] fix bug while mnode replica --- src/mnode/src/mnodeDnode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mnode/src/mnodeDnode.c b/src/mnode/src/mnodeDnode.c index 0f2bbb8235..e16195499b 100644 --- a/src/mnode/src/mnodeDnode.c +++ b/src/mnode/src/mnodeDnode.c @@ -348,7 +348,6 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) { pRsp->dnodeCfg.dnodeId = htonl(pDnode->dnodeId); pRsp->dnodeCfg.moduleStatus = htonl((int32_t)pDnode->isMgmt); pRsp->dnodeCfg.numOfVnodes = htonl(openVnodes); - mnodeGetMnodeInfos(&pRsp->mnodes); SDMVgroupAccess *pAccess = (SDMVgroupAccess *)((char *)pRsp + sizeof(SDMStatusRsp)); for (int32_t j = 0; j < openVnodes; ++j) { @@ -392,6 +391,10 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) { } pDnode->lastAccess = tsAccessSquence; + + //this func should be called after sdb replica changed + mnodeGetMnodeInfos(&pRsp->mnodes); + mnodeDecDnodeRef(pDnode); pMsg->rpcRsp.len = contLen; -- GitLab