Merge pull request #27131 from taosdata/fix/TD-31345

fix(meta/query): return oom with null ctb cursor
This commit is contained in:
Hongze Cheng 2024-08-12 09:11:01 +08:00 committed by GitHub
commit 4586e09b7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -1449,6 +1449,9 @@ int32_t metaGetTableTagsByUids(void *pVnode, int64_t suid, SArray *uidList) {
int32_t metaGetTableTags(void *pVnode, uint64_t suid, SArray *pUidTagInfo) { int32_t metaGetTableTags(void *pVnode, uint64_t suid, SArray *pUidTagInfo) {
SMCtbCursor *pCur = metaOpenCtbCursor(pVnode, suid, 1); SMCtbCursor *pCur = metaOpenCtbCursor(pVnode, suid, 1);
if (!pCur) {
TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY);
}
// If len > 0 means there already have uids, and we only want the // If len > 0 means there already have uids, and we only want the
// tags of the specified tables, of which uid in the uid list. Otherwise, all table tags are retrieved and kept // tags of the specified tables, of which uid in the uid list. Otherwise, all table tags are retrieved and kept