diff --git a/source/dnode/vnode/src/meta/metaQuery.c b/source/dnode/vnode/src/meta/metaQuery.c index 4b1163bb11138f062ca86ee33f7acdc4a57d640e..d3382373144aaef5efb72dce65e8d602e0064317 100644 --- a/source/dnode/vnode/src/meta/metaQuery.c +++ b/source/dnode/vnode/src/meta/metaQuery.c @@ -1301,6 +1301,7 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) { /// src: [[suid, cid1, type1]....[suid, cid2, type2]....[suid, cid3, type3]...] /// target: [suid, cid2, type2] + int diffCidCount = 0; do { void *entryKey = NULL, *entryVal = NULL; int32_t nEntryKey, nEntryVal; @@ -1317,7 +1318,9 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) { if (p == NULL) break; if (p->type != pCursor->type || p->suid != pCursor->suid || p->cid != pCursor->cid) { - if (found == true) break; + if (found == true) break; // + if (diffCidCount > TRY_ERROR_LIMIT) break; + diffCidCount++; count++; valid = param->reverse ? tdbTbcMoveToPrev(pCursor->pCur) : tdbTbcMoveToNext(pCursor->pCur); if (valid < 0) {