support filter out tsma res tbs when show stables/tables

This commit is contained in:
wangjiaming0909 2024-03-18 17:54:50 +08:00
parent a8e00f7410
commit d1101a0325
3 changed files with 18 additions and 0 deletions

View File

@ -416,6 +416,14 @@ int32_t taosGenCrashJsonMsg(int signum, char **pMsg, int64_t clusterId, int64_t
#define TSMA_RES_STB_POSTFIX "_tsma_res_stb_"
static inline bool isTsmaResSTb(const char* stbName) {
const char* pos = strstr(stbName, TSMA_RES_STB_POSTFIX);
if (pos && strlen(stbName) == (pos - stbName) + strlen(TSMA_RES_STB_POSTFIX)) {
return true;
}
return false;
}
#ifdef __cplusplus
}
#endif

View File

@ -3231,6 +3231,11 @@ static int32_t mndRetrieveStb(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBloc
continue;
}
if (isTsmaResSTb(pStb->name)) {
sdbRelease(pSdb, pStb);
continue;
}
cols = 0;
SName name = {0};

View File

@ -1408,6 +1408,11 @@ static SSDataBlock* sysTableBuildUserTables(SOperatorInfo* pOperator) {
T_LONG_JMP(pTaskInfo->env, terrno);
}
if (isTsmaResSTb(mr.me.name)) {
pAPI->metaReaderFn.clearReader(&mr);
continue;
}
// number of columns
pColInfoData = taosArrayGet(p->pDataBlock, 3);
colDataSetVal(pColInfoData, numOfRows, (char*)&mr.me.stbEntry.schemaRow.nCols, false);