Merge pull request #19848 from taosdata/FIX/TD-22121-main

enh: set terrno as Invalid table ID while tdbTbGet suid failure in metaUpdateTagIdx
This commit is contained in:
Xiaoyu Wang 2023-02-08 16:29:23 +08:00 committed by GitHub
commit 277469083f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1343,6 +1343,9 @@ static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry) {
int32_t ret = 0; int32_t ret = 0;
// get super table // get super table
if (tdbTbGet(pMeta->pUidIdx, &pCtbEntry->ctbEntry.suid, sizeof(tb_uid_t), &pData, &nData) != 0) { if (tdbTbGet(pMeta->pUidIdx, &pCtbEntry->ctbEntry.suid, sizeof(tb_uid_t), &pData, &nData) != 0) {
metaError("vgId:%d, failed to get stable suid for update. version:%" PRId64, TD_VID(pMeta->pVnode),
pCtbEntry->version);
terrno = TSDB_CODE_TDB_INVALID_TABLE_ID;
ret = -1; ret = -1;
goto end; goto end;
} }