should not send msg while sdb restore
This commit is contained in:
parent
294f8d0a6c
commit
c3a19c9d66
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue