From 452e702a15f2389c302592f6db892289beb6477e Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 13 Jul 2020 17:05:54 +0800 Subject: [PATCH] reset msg while create vgroup --- src/mnode/src/mnodeVgroup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mnode/src/mnodeVgroup.c b/src/mnode/src/mnodeVgroup.c index 48589fb694..d48b8997e5 100644 --- a/src/mnode/src/mnodeVgroup.c +++ b/src/mnode/src/mnodeVgroup.c @@ -471,6 +471,8 @@ static int32_t mnodeCreateVgroupCb(SMnodeMsg *pMsg, int32_t code) { } pMsg->expected = pVgroup->numOfVnodes; + pMsg->successed = 0; + pMsg->received = 0; mnodeSendCreateVgroupMsg(pVgroup, pMsg); return TSDB_CODE_MND_ACTION_IN_PROGRESS; @@ -836,6 +838,8 @@ static void mnodeProcessCreateVnodeRsp(SRpcMsg *rpcMsg) { pVgroup->vgId, tstrerror(rpcMsg->code), mnodeMsg->received, mnodeMsg->successed, mnodeMsg->expected, mnodeMsg->rpcMsg.handle, rpcMsg->ahandle); + assert(mnodeMsg->received <= mnodeMsg->expected); + if (mnodeMsg->received != mnodeMsg->expected) return; if (mnodeMsg->received == mnodeMsg->successed) { -- GitLab