check empty

This commit is contained in:
tangfangzhi 2023-05-29 14:02:36 +08:00
parent 24937c3d5b
commit e21a2f9cce
1 changed files with 7 additions and 5 deletions

View File

@ -995,11 +995,13 @@ static int32_t mndProcessDropDnodeReq(SRpcMsg *pReq) {
goto _OVER; goto _OVER;
} }
if (!isonline && !force) { if (numOfVnodes > 0 || pMObj != NULL || pSObj != NULL || pQObj != NULL) {
terrno = TSDB_CODE_DNODE_OFFLINE; if (!isonline && !force) {
mError("dnode:%d, failed to drop since %s, vnodes:%d mnode:%d qnode:%d snode:%d", pDnode->id, terrstr(), terrno = TSDB_CODE_DNODE_OFFLINE;
numOfVnodes, pMObj != NULL, pQObj != NULL, pSObj != NULL); mError("dnode:%d, failed to drop since %s, vnodes:%d mnode:%d qnode:%d snode:%d", pDnode->id, terrstr(),
goto _OVER; numOfVnodes, pMObj != NULL, pQObj != NULL, pSObj != NULL);
goto _OVER;
}
} }
code = mndDropDnode(pMnode, pReq, pDnode, pMObj, pQObj, pSObj, numOfVnodes, force, dropReq.unsafe); code = mndDropDnode(pMnode, pReq, pDnode, pMObj, pQObj, pSObj, numOfVnodes, force, dropReq.unsafe);