提交 9ba5381b 编写于 作者: dengyihao's avatar dengyihao

fix filter error

上级 4b6c0736
...@@ -1268,6 +1268,8 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) { ...@@ -1268,6 +1268,8 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
int count = 0; int count = 0;
int32_t valid = 0; int32_t valid = 0;
static const int8_t TRY_ERROR_LIMIT = 4;
while (1) { while (1) {
void *entryKey = NULL, *entryVal = NULL; void *entryKey = NULL, *entryVal = NULL;
int32_t nEntryKey, nEntryVal; int32_t nEntryKey, nEntryVal;
...@@ -1279,7 +1281,7 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) { ...@@ -1279,7 +1281,7 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
STagIdxKey *p = entryKey; STagIdxKey *p = entryKey;
if (p == NULL) break; if (p == NULL) break;
if (count >= 4) { if (count >= TRY_ERROR_LIMIT) {
if (p->type != pCursor->type || p->suid != pCursor->suid || p->cid != pCursor->cid) { if (p->type != pCursor->type || p->suid != pCursor->suid || p->cid != pCursor->cid) {
break; break;
} }
...@@ -1305,11 +1307,11 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) { ...@@ -1305,11 +1307,11 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
} }
taosArrayPush(pUids, &tuid); taosArrayPush(pUids, &tuid);
} else if (cmp == 1) { } else if (cmp == 1) {
if (count >= 4) break; if (count >= TRY_ERROR_LIMIT) break;
// not match but should continue to iter // not match but should continue to iter
} else { } else {
// not match and no more result // not match and no more result
if (count >= 4) break; if (count >= TRY_ERROR_LIMIT) break;
} }
count++; count++;
valid = param->reverse ? tdbTbcMoveToPrev(pCursor->pCur) : tdbTbcMoveToNext(pCursor->pCur); valid = param->reverse ? tdbTbcMoveToPrev(pCursor->pCur) : tdbTbcMoveToNext(pCursor->pCur);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册