提交 27b8671f 编写于 作者: M Minglei Jin

tsdb/cache: new cacheReader field for tsdb & cache reader

上级 9b0b4061
...@@ -851,27 +851,27 @@ typedef struct STsdbReaderInfo { ...@@ -851,27 +851,27 @@ typedef struct STsdbReaderInfo {
typedef struct SCacheRowsReader { typedef struct SCacheRowsReader {
STsdb *pTsdb; STsdb *pTsdb;
STsdbReaderInfo info; STsdbReaderInfo info;
// SVersionRange verRange; int8_t cacheReader; // always true for cache reader
TdThreadMutex readerMutex; TdThreadMutex readerMutex;
SVnode *pVnode; SVnode *pVnode;
STSchema *pSchema; STSchema *pSchema;
STSchema *pCurrSchema; STSchema *pCurrSchema;
uint64_t uid; uint64_t uid;
uint64_t suid; uint64_t suid;
char **transferBuf; // todo remove it soon char **transferBuf; // todo remove it soon
int32_t numOfCols; int32_t numOfCols;
SArray *pCidList; SArray *pCidList;
int32_t *pSlotIds; int32_t *pSlotIds;
int32_t type; int32_t type;
int32_t tableIndex; // currently returned result tables int32_t tableIndex; // currently returned result tables
STableKeyInfo *pTableList; // table id list STableKeyInfo *pTableList; // table id list
int32_t numOfTables; int32_t numOfTables;
SArray *pLDataIterArray; SArray *pLDataIterArray;
STsdbReadSnap *pReadSnap; STsdbReadSnap *pReadSnap;
SDataFReader *pDataFReader; SDataFReader *pDataFReader;
SDataFReader *pDataFReaderLast; SDataFReader *pDataFReaderLast;
char *idstr; char *idstr;
int64_t lastTs; int64_t lastTs;
} SCacheRowsReader; } SCacheRowsReader;
typedef struct { typedef struct {
......
...@@ -191,6 +191,7 @@ int32_t tsdbCacherowsReaderOpen(void* pVnode, int32_t type, void* pTableIdList, ...@@ -191,6 +191,7 @@ int32_t tsdbCacherowsReaderOpen(void* pVnode, int32_t type, void* pTableIdList,
taosThreadMutexInit(&p->readerMutex, NULL); taosThreadMutexInit(&p->readerMutex, NULL);
p->lastTs = INT64_MIN; p->lastTs = INT64_MIN;
p->cacheReader = 1;
*pReader = p; *pReader = p;
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
......
...@@ -186,6 +186,7 @@ typedef struct SReaderStatus { ...@@ -186,6 +186,7 @@ typedef struct SReaderStatus {
struct STsdbReader { struct STsdbReader {
STsdb* pTsdb; STsdb* pTsdb;
STsdbReaderInfo info; STsdbReaderInfo info;
int8_t cacheReader; // always false for tsdb reader
TdThreadMutex readerMutex; TdThreadMutex readerMutex;
EReaderStatus flag; EReaderStatus flag;
int32_t code; int32_t code;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册