fix: avoid filter slow when filter not exist value
This commit is contained in:
parent
c5348ce793
commit
c13cea4f44
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue