提交 c3a19c9d 编写于 作者: S slguan

should not send msg while sdb restore

上级 294f8d0a
......@@ -32,7 +32,7 @@ void mgmtCleanUpVgroups();
SVgObj *mgmtGetVgroup(int32_t vgId);
void mgmtIncVgroupRef(SVgObj *pVgroup);
void mgmtDecVgroupRef(SVgObj *pVgroup);
void mgmtDropAllDbVgroups(SDbObj *pDropDb);
void mgmtDropAllDbVgroups(SDbObj *pDropDb, bool sendMsg);
void mgmtDropAllDnodeVgroups(SDnodeObj *pDropDnode);
void * mgmtGetNextVgroup(void *pNode, SVgObj **pVgroup);
......
......@@ -82,7 +82,7 @@ static int32_t mgmtDbActionDelete(SSdbOper *pOper) {
mgmtDropDbFromAcct(pAcct, pDb);
mgmtDropAllChildTables(pDb);
mgmtDropAllSuperTables(pDb);
mgmtDropAllDbVgroups(pDb);
mgmtDropAllDbVgroups(pDb, false);
mgmtDecAcctRef(pAcct);
return TSDB_CODE_SUCCESS;
......@@ -932,7 +932,9 @@ static void mgmtProcessDropDbMsg(SQueuedMsg *pMsg) {
return;
}
#if 0
#if 1
mgmtDropAllDbVgroups(pMsg->pDb, true);
#else
SVgObj *pVgroup = pMsg->pDb->pHead;
if (pVgroup != NULL) {
mPrint("vgId:%d, will be dropped", pVgroup->vgId);
......
......@@ -773,7 +773,7 @@ void mgmtDropAllDnodeVgroups(SDnodeObj *pDropDnode) {
}
}
void mgmtDropAllDbVgroups(SDbObj *pDropDb) {
void mgmtDropAllDbVgroups(SDbObj *pDropDb, bool sendMsg) {
void *pNode = NULL;
void *pLastNode = NULL;
int32_t numOfVgroups = 0;
......@@ -794,7 +794,10 @@ void mgmtDropAllDbVgroups(SDbObj *pDropDb) {
sdbDeleteRow(&oper);
pNode = pLastNode;
numOfVgroups++;
mgmtSendDropVgroupMsg(pVgroup, NULL);
if (sendMsg) {
mgmtSendDropVgroupMsg(pVgroup, NULL);
}
}
mgmtDecVgroupRef(pVgroup);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册