Merge pull request #26755 from taosdata/fix/TD-30989-mnode12

fix/TD-30989
This commit is contained in:
Hongze Cheng 2024-07-25 08:52:52 +08:00 committed by GitHub
commit 2d9e737bed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 616 additions and 377 deletions

File diff suppressed because it is too large Load Diff

View File

@ -43,9 +43,7 @@ int32_t mndInitView(SMnode *pMnode) {
#endif #endif
} }
void mndCleanupView(SMnode *pMnode) { void mndCleanupView(SMnode *pMnode) { mDebug("mnd view cleanup"); }
mDebug("mnd view cleanup");
}
int32_t mndProcessCreateViewReq(SRpcMsg *pReq) { int32_t mndProcessCreateViewReq(SRpcMsg *pReq) {
#ifndef TD_ENTERPRISE #ifndef TD_ENTERPRISE
@ -53,8 +51,7 @@ int32_t mndProcessCreateViewReq(SRpcMsg *pReq) {
#else #else
SCMCreateViewReq createViewReq = {0}; SCMCreateViewReq createViewReq = {0};
if (tDeserializeSCMCreateViewReq(pReq->pCont, pReq->contLen, &createViewReq) != 0) { if (tDeserializeSCMCreateViewReq(pReq->pCont, pReq->contLen, &createViewReq) != 0) {
terrno = TSDB_CODE_INVALID_MSG; TAOS_RETURN(TSDB_CODE_INVALID_MSG);
return -1;
} }
mInfo("start to create view:%s, sql:%s", createViewReq.fullname, createViewReq.sql); mInfo("start to create view:%s, sql:%s", createViewReq.fullname, createViewReq.sql);
@ -69,8 +66,7 @@ int32_t mndProcessDropViewReq(SRpcMsg *pReq) {
#else #else
SCMDropViewReq dropViewReq = {0}; SCMDropViewReq dropViewReq = {0};
if (tDeserializeSCMDropViewReq(pReq->pCont, pReq->contLen, &dropViewReq) != 0) { if (tDeserializeSCMDropViewReq(pReq->pCont, pReq->contLen, &dropViewReq) != 0) {
terrno = TSDB_CODE_INVALID_MSG; TAOS_RETURN(TSDB_CODE_INVALID_MSG);
return -1;
} }
mInfo("start to drop view:%s, sql:%s", dropViewReq.name, dropViewReq.sql); mInfo("start to drop view:%s, sql:%s", dropViewReq.name, dropViewReq.sql);
@ -86,15 +82,13 @@ int32_t mndProcessGetViewMetaReq(SRpcMsg *pReq) {
SViewMetaReq req = {0}; SViewMetaReq req = {0};
if (tDeserializeSViewMetaReq(pReq->pCont, pReq->contLen, &req) != 0) { if (tDeserializeSViewMetaReq(pReq->pCont, pReq->contLen, &req) != 0) {
terrno = TSDB_CODE_INVALID_MSG; TAOS_RETURN(TSDB_CODE_INVALID_MSG);
return -1;
} }
return mndProcessViewMetaReqImpl(&req, pReq); return mndProcessViewMetaReqImpl(&req, pReq);
#endif #endif
} }
int32_t mndRetrieveView(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { int32_t mndRetrieveView(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) {
#ifndef TD_ENTERPRISE #ifndef TD_ENTERPRISE
return 0; return 0;
@ -107,6 +101,3 @@ void mndCancelGetNextView(SMnode *pMnode, void *pIter) {
SSdb *pSdb = pMnode->pSdb; SSdb *pSdb = pMnode->pSdb;
sdbCancelFetch(pSdb, pIter); sdbCancelFetch(pSdb, pIter);
} }