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

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

上级 9b0b4061
......@@ -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 {
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册