From 3f58bc557895d859117608b8c14940d60d9a6e3c Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 20 Jul 2023 10:55:15 +0800 Subject: [PATCH] fix: group cache last block index issue --- source/libs/executor/src/groupcacheoperator.c | 2 +- source/libs/executor/src/scanoperator.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/groupcacheoperator.c b/source/libs/executor/src/groupcacheoperator.c index 117763b40a..7a55b42e1a 100755 --- a/source/libs/executor/src/groupcacheoperator.c +++ b/source/libs/executor/src/groupcacheoperator.c @@ -580,7 +580,7 @@ static int32_t getBlkFromSessionCacheImpl(struct SOperatorInfo* pOperator, int64 int64_t* pIdx = taosArrayGet(pBatchList->pBlkList, 0); taosRUnLockLatch(&pBatchList->lock); code = retrieveBlkFromBufCache(pGCache, pSession->pGroupData, sessionId, *pIdx, &pSession->nextOffset, ppRes); - pSession->lastBlkId = *pIdx; + pSession->lastBlkId = 0; return code; } } else if (pSession->lastBlkId < blkNum) { diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 90a7cebf81..efbee405f2 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -797,7 +797,8 @@ static int32_t createTableListInfoFromParam(SOperatorInfo* pOperator) { return TSDB_CODE_INVALID_PARA; } - qError("add total %d dynamic tables to scan, tableSeq:%d, exist num:%" PRId64, num, pParam->tableSeq, (int64_t)taosArrayGetSize(pListInfo->pTableList)); + qError("vgId:%d add total %d dynamic tables to scan, tableSeq:%d, exist num:%" PRId64, + pTaskInfo->id.vgId, num, pParam->tableSeq, (int64_t)taosArrayGetSize(pListInfo->pTableList)); if (pParam->tableSeq) { pListInfo->oneTableForEachGroup = true;