enh: support drop table with uid

This commit is contained in:
kailixu 2024-09-20 10:25:12 +08:00
parent 3fd2e51e06
commit 0fbf166a3b
1 changed files with 6 additions and 10 deletions

View File

@ -1173,16 +1173,12 @@ int32_t getDbTableVgroupFromCache(SParseMetaCache* pMetaCache, const SName* pNam
} }
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = TSDB_CODE_PAR_INTERNAL_ERROR; code = TSDB_CODE_PAR_INTERNAL_ERROR;
int32_t vgSize = taosArrayGetSize(pVgArray); uint32_t hashValue =
for (int32_t i = 0; i < vgSize; ++i) { taosGetTbHashVal(fullName, fullTbLen, pDbCfg->hashMethod, pDbCfg->hashPrefix, pDbCfg->hashSuffix);
uint32_t hashValue = SVgroupInfo* pVg = taosArraySearch(pVgArray, &hashValue, ctgHashValueComp, TD_EQ);
taosGetTbHashVal(fullName, fullTbLen, pDbCfg->hashMethod, pDbCfg->hashPrefix, pDbCfg->hashSuffix); if (pVg) {
SVgroupInfo* pVg = taosArraySearch(pVgArray, &hashValue, ctgHashValueComp, TD_EQ); memcpy(pVgroup, pVg, sizeof(SVgroupInfo));
if (pVg) { code = TSDB_CODE_SUCCESS;
memcpy(pVgroup, pVg, sizeof(SVgroupInfo));
code = TSDB_CODE_SUCCESS;
break;
}
} }
} }
return code; return code;