From 5f18a32e5d898bbfd032560b48862c34c0d59743 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Sat, 8 Oct 2022 14:14:46 +0800 Subject: [PATCH] fix(query): mem tskey maybe large than pCheckInfo->lastKey if order desc --- src/tsdb/src/tsdbRead.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tsdb/src/tsdbRead.c b/src/tsdb/src/tsdbRead.c index 3d72a7bde3..2126597e42 100644 --- a/src/tsdb/src/tsdbRead.c +++ b/src/tsdb/src/tsdbRead.c @@ -836,9 +836,11 @@ static bool initTableMemIterator(STsdbQueryHandle* pHandle, STableCheckInfo* pCh if (ASCENDING_TRAVERSE(order)) { assert(pCheckInfo->lastKey <= key); - } else { - assert(pCheckInfo->lastKey >= key); } + // mem data tskey maybe large than pCheckInfo->lastKey + //} else { + // assert(pCheckInfo->lastKey >= key); + //} } else { tsdbDebug("%p uid:%"PRId64", tid:%d no data in mem, 0x%"PRIx64, pHandle, pCheckInfo->tableId.uid, pCheckInfo->tableId.tid, @@ -858,9 +860,11 @@ static bool initTableMemIterator(STsdbQueryHandle* pHandle, STableCheckInfo* pCh if (ASCENDING_TRAVERSE(order)) { assert(pCheckInfo->lastKey <= key); - } else { - assert(pCheckInfo->lastKey >= key); } + // imem data tskey maybe large than pCheckInfo->lastKey + //} else { + // assert(pCheckInfo->lastKey >= key); + //} } else { tsdbDebug("%p uid:%"PRId64", tid:%d no data in imem, 0x%"PRIx64, pHandle, pCheckInfo->tableId.uid, pCheckInfo->tableId.tid, pHandle->qId); -- GitLab