fix:drop topic error if topic not exist
This commit is contained in:
parent
89884e1c49
commit
cca00406a5
|
@ -664,20 +664,18 @@ static int32_t mndProcessDropTopicReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
if (tDeserializeSMDropTopicReq(pReq->pCont, pReq->contLen, &dropReq) != 0) {
|
if (tDeserializeSMDropTopicReq(pReq->pCont, pReq->contLen, &dropReq) != 0) {
|
||||||
terrno = TSDB_CODE_INVALID_MSG;
|
terrno = TSDB_CODE_INVALID_MSG;
|
||||||
code = -1;
|
return -1;
|
||||||
goto end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pTopic = mndAcquireTopic(pMnode, dropReq.name);
|
pTopic = mndAcquireTopic(pMnode, dropReq.name);
|
||||||
if (pTopic == NULL) {
|
if (pTopic == NULL) {
|
||||||
if (dropReq.igNotExists) {
|
if (dropReq.igNotExists) {
|
||||||
mInfo("topic:%s, not exist, ignore not exist is set", dropReq.name);
|
mInfo("topic:%s, not exist, ignore not exist is set", dropReq.name);
|
||||||
goto end;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
terrno = TSDB_CODE_MND_TOPIC_NOT_EXIST;
|
terrno = TSDB_CODE_MND_TOPIC_NOT_EXIST;
|
||||||
mError("topic:%s, failed to drop since %s", dropReq.name, terrstr());
|
mError("topic:%s, failed to drop since %s", dropReq.name, terrstr());
|
||||||
code = -1;
|
return -1;
|
||||||
goto end;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue