minor changes
This commit is contained in:
parent
fde22bca36
commit
4c95270f58
|
@ -267,9 +267,9 @@ static int32_t mndProcessCreateFuncReq(SMnodeMsg *pReq) {
|
||||||
|
|
||||||
mDebug("func:%s, start to create", pCreate->name);
|
mDebug("func:%s, start to create", pCreate->name);
|
||||||
|
|
||||||
SFuncObj *pFunc = mndAcquireFunc(pMnode->pSdb, pCreate->name);
|
SFuncObj *pFunc = mndAcquireFunc(pMnode, pCreate->name);
|
||||||
if (pFunc != NULL) {
|
if (pFunc != NULL) {
|
||||||
mndReleaseFunc(pMnode->pSdb, pFunc);
|
mndReleaseFunc(pMnode, pFunc);
|
||||||
if (pCreate->igExists) {
|
if (pCreate->igExists) {
|
||||||
mDebug("stb:%s, already exist, ignore exist is set", pCreate->name);
|
mDebug("stb:%s, already exist, ignore exist is set", pCreate->name);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -334,7 +334,7 @@ static int32_t mndProcessDropFuncReq(SMnodeMsg *pReq) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SFuncObj *pFunc = mndAcquireFunc(pMnode->pSdb, pDrop->name);
|
SFuncObj *pFunc = mndAcquireFunc(pMnode, pDrop->name);
|
||||||
if (pFunc == NULL) {
|
if (pFunc == NULL) {
|
||||||
if (pDrop->igNotExists) {
|
if (pDrop->igNotExists) {
|
||||||
mDebug("func:%s, not exist, ignore not exist is set", pDrop->name);
|
mDebug("func:%s, not exist, ignore not exist is set", pDrop->name);
|
||||||
|
@ -347,6 +347,8 @@ static int32_t mndProcessDropFuncReq(SMnodeMsg *pReq) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t code = mndDropFunc(pMnode, pReq, pFunc);
|
int32_t code = mndDropFunc(pMnode, pReq, pFunc);
|
||||||
|
mndReleaseFunc(pMnode, pFunc);
|
||||||
|
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("func:%s, failed to drop since %s", pDrop->name, terrstr());
|
mError("func:%s, failed to drop since %s", pDrop->name, terrstr());
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -483,7 +483,7 @@ static int32_t mndProcessMCreateStbReq(SMnodeMsg *pReq) {
|
||||||
|
|
||||||
SStbObj *pStb = mndAcquireStb(pMnode, pCreate->name);
|
SStbObj *pStb = mndAcquireStb(pMnode, pCreate->name);
|
||||||
if (pStb != NULL) {
|
if (pStb != NULL) {
|
||||||
mndReleaseStb(pMnode->pSdb, pStb);
|
mndReleaseStb(pMnode, pStb);
|
||||||
if (pCreate->igExists) {
|
if (pCreate->igExists) {
|
||||||
mDebug("stb:%s, already exist, ignore exist is set", pCreate->name);
|
mDebug("stb:%s, already exist, ignore exist is set", pCreate->name);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -643,7 +643,7 @@ static int32_t mndDropStb(SMnode *pMnode, SMnodeMsg *pReq, SStbObj *pStb) {
|
||||||
|
|
||||||
DROP_STB_OVER:
|
DROP_STB_OVER:
|
||||||
mndTransDrop(pTrans);
|
mndTransDrop(pTrans);
|
||||||
return 0;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t mndProcessMDropStbReq(SMnodeMsg *pReq) {
|
static int32_t mndProcessMDropStbReq(SMnodeMsg *pReq) {
|
||||||
|
@ -668,7 +668,6 @@ static int32_t mndProcessMDropStbReq(SMnodeMsg *pReq) {
|
||||||
mndReleaseStb(pMnode, pStb);
|
mndReleaseStb(pMnode, pStb);
|
||||||
|
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
terrno = code;
|
|
||||||
mError("stb:%s, failed to drop since %s", pDrop->name, terrstr());
|
mError("stb:%s, failed to drop since %s", pDrop->name, terrstr());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue