diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index aecdff77fb30d6a1d443ea017e0d7ed0fdb75e60..99353f5485c6178834f6a792b3c5e805fc795b89 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -851,27 +851,27 @@ typedef struct STsdbReaderInfo { typedef struct SCacheRowsReader { STsdb *pTsdb; STsdbReaderInfo info; - // SVersionRange verRange; - TdThreadMutex readerMutex; - SVnode *pVnode; - STSchema *pSchema; - STSchema *pCurrSchema; - uint64_t uid; - uint64_t suid; - char **transferBuf; // todo remove it soon - int32_t numOfCols; - SArray *pCidList; - int32_t *pSlotIds; - int32_t type; - int32_t tableIndex; // currently returned result tables - STableKeyInfo *pTableList; // table id list - int32_t numOfTables; - SArray *pLDataIterArray; - STsdbReadSnap *pReadSnap; - SDataFReader *pDataFReader; - SDataFReader *pDataFReaderLast; - char *idstr; - int64_t lastTs; + int8_t cacheReader; // always true for cache reader + TdThreadMutex readerMutex; + SVnode *pVnode; + STSchema *pSchema; + STSchema *pCurrSchema; + uint64_t uid; + uint64_t suid; + char **transferBuf; // todo remove it soon + int32_t numOfCols; + SArray *pCidList; + int32_t *pSlotIds; + int32_t type; + int32_t tableIndex; // currently returned result tables + STableKeyInfo *pTableList; // table id list + int32_t numOfTables; + SArray *pLDataIterArray; + STsdbReadSnap *pReadSnap; + SDataFReader *pDataFReader; + SDataFReader *pDataFReaderLast; + char *idstr; + int64_t lastTs; } SCacheRowsReader; typedef struct { diff --git a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c index 1b6fc2c9e4a6ffe01807282eda01d0c8bbd83c37..6b06831a2e72722febb63181eb61e35c7da2cec8 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCacheRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbCacheRead.c @@ -191,6 +191,7 @@ int32_t tsdbCacherowsReaderOpen(void* pVnode, int32_t type, void* pTableIdList, taosThreadMutexInit(&p->readerMutex, NULL); p->lastTs = INT64_MIN; + p->cacheReader = 1; *pReader = p; return TSDB_CODE_SUCCESS; diff --git a/source/dnode/vnode/src/tsdb/tsdbReadUtil.h b/source/dnode/vnode/src/tsdb/tsdbReadUtil.h index c343eafb541c8bc0b5df151f763f035c11c735a1..33bb343e01107a6b7ca8dd8907bdaaeb62fc774c 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReadUtil.h +++ b/source/dnode/vnode/src/tsdb/tsdbReadUtil.h @@ -186,6 +186,7 @@ typedef struct SReaderStatus { struct STsdbReader { STsdb* pTsdb; STsdbReaderInfo info; + int8_t cacheReader; // always false for tsdb reader TdThreadMutex readerMutex; EReaderStatus flag; int32_t code;