From 8cac64788197111197d76be484e4dcf22c587027 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 11 Aug 2022 18:12:32 +0800 Subject: [PATCH] fix: return stable not exists --- source/dnode/vnode/src/meta/metaTable.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 7427f79509..3e7fd9df2b 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -209,8 +209,8 @@ int metaCreateSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) { return 0; _err: - metaError("vgId:%d, failed to create stb:%s uid:%" PRId64 " since %s", TD_VID(pMeta->pVnode), pReq->name, - pReq->suid, tstrerror(terrno)); + metaError("vgId:%d, failed to create stb:%s uid:%" PRId64 " since %s", TD_VID(pMeta->pVnode), pReq->name, pReq->suid, + tstrerror(terrno)); return -1; } @@ -304,7 +304,8 @@ int metaAlterSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) { ret = tdbTbcGet(pUidIdxc, NULL, NULL, &pData, &nData); if (ret < 0) { - ASSERT(0); + terrno = TSDB_CODE_TDB_STB_NOT_EXIST; + // ASSERT(0); return -1; } @@ -1196,6 +1197,9 @@ static int metaSaveToSkmDb(SMeta *pMeta, const SMetaEntry *pME) { goto _exit; } + metaDebug("vgId:%d, set schema:(%" PRId64 ") sver:%d since %s", TD_VID(pMeta->pVnode), pME->uid, pSW->version, + tstrerror(terrno)); + _exit: taosMemoryFree(pVal); tEncoderClear(&coder); -- GitLab