diff --git a/src/system/detail/src/vnodeQueryImpl.c b/src/system/detail/src/vnodeQueryImpl.c index e1ab5215ab40b5f68409eb6c71cc025a9f226a96..dc0d3febcee17408bbd7a327331d4e9d67d3416b 100644 --- a/src/system/detail/src/vnodeQueryImpl.c +++ b/src/system/detail/src/vnodeQueryImpl.c @@ -1148,10 +1148,11 @@ SCacheBlock *getCacheDataBlock(SMeterObj *pMeterObj, SQueryRuntimeEnv *pRuntimeE SCacheBlock *pNewBlock = &pRuntimeEnv->cacheBlock; - // the commit data points will be ignored int32_t offset = 0; int32_t numOfPoints = pNewBlock->numOfPoints; - if (pQuery->firstSlot == pQuery->commitSlot) { + + // the commit data points will be ignored + if (slot == pQuery->commitSlot) { assert(pQuery->commitPoint >= 0 && pQuery->commitPoint <= pNewBlock->numOfPoints); offset = pQuery->commitPoint;