fix: table list issue
This commit is contained in:
parent
a41888a9ef
commit
b9b8fa1ba2
|
@ -937,7 +937,6 @@ static int32_t doSetQualifiedUid(STableListInfo* pListInfo, SArray* pUidList, co
|
||||||
info.uid = uid;
|
info.uid = uid;
|
||||||
void* p = taosArrayPush(pListInfo->pTableList, &info);
|
void* p = taosArrayPush(pListInfo->pTableList, &info);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
taosArrayDestroy(pUidList);
|
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -964,7 +963,8 @@ static void copyExistedUids(SArray* pUidTagList, const SArray* pUidList) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t doFilterByTagCond(STableListInfo* pListInfo, SArray* pUidList, SNode* pTagCond, void* pVnode,
|
static int32_t doFilterByTagCond(STableListInfo* pListInfo, SArray* pUidList, SNode* pTagCond, void* pVnode,
|
||||||
SIdxFltStatus status, SStorageAPI* pAPI, bool addUid) {
|
SIdxFltStatus status, SStorageAPI* pAPI, bool addUid, bool* listAdded) {
|
||||||
|
*listAdded = false;
|
||||||
if (pTagCond == NULL) {
|
if (pTagCond == NULL) {
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1058,6 +1058,7 @@ static int32_t doFilterByTagCond(STableListInfo* pListInfo, SArray* pUidList, SN
|
||||||
terrno = code;
|
terrno = code;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
*listAdded = true;
|
||||||
|
|
||||||
end:
|
end:
|
||||||
taosHashCleanup(ctx.colHash);
|
taosHashCleanup(ctx.colHash);
|
||||||
|
@ -1088,11 +1089,10 @@ int32_t getTableList(void* pVnode, SScanPhysiNode* pScanNode, SNode* pTagCond, S
|
||||||
if (pStorageAPI->metaFn.isTableExisted(pVnode, pScanNode->uid)) {
|
if (pStorageAPI->metaFn.isTableExisted(pVnode, pScanNode->uid)) {
|
||||||
taosArrayPush(pUidList, &pScanNode->uid);
|
taosArrayPush(pUidList, &pScanNode->uid);
|
||||||
}
|
}
|
||||||
code = doFilterByTagCond(pListInfo, pUidList, pTagCond, pVnode, status, pStorageAPI, false);
|
code = doFilterByTagCond(pListInfo, pUidList, pTagCond, pVnode, status, pStorageAPI, false, &listAdded);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
goto _end;
|
goto _end;
|
||||||
}
|
}
|
||||||
listAdded = true;
|
|
||||||
} else {
|
} else {
|
||||||
T_MD5_CTX context = {0};
|
T_MD5_CTX context = {0};
|
||||||
|
|
||||||
|
@ -1133,11 +1133,10 @@ int32_t getTableList(void* pVnode, SScanPhysiNode* pScanNode, SNode* pTagCond, S
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
code = doFilterByTagCond(pListInfo, pUidList, pTagCond, pVnode, status, pStorageAPI, tsTagFilterCache);
|
code = doFilterByTagCond(pListInfo, pUidList, pTagCond, pVnode, status, pStorageAPI, tsTagFilterCache, &listAdded);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
goto _end;
|
goto _end;
|
||||||
}
|
}
|
||||||
listAdded = true;
|
|
||||||
|
|
||||||
// let's add the filter results into meta-cache
|
// let's add the filter results into meta-cache
|
||||||
numOfTables = taosArrayGetSize(pUidList);
|
numOfTables = taosArrayGetSize(pUidList);
|
||||||
|
|
Loading…
Reference in New Issue