fix(tsdb): set the correct lflag when creating tsdbCache reader.
This commit is contained in:
parent
0f8ff48c6b
commit
ace5e12e65
|
@ -35,6 +35,7 @@ extern "C" {
|
|||
#define CACHESCAN_RETRIEVE_TYPE_SINGLE 0x2
|
||||
#define CACHESCAN_RETRIEVE_LAST_ROW 0x4
|
||||
#define CACHESCAN_RETRIEVE_LAST 0x8
|
||||
#define CACHESCAN_RETRIEVE_PK 0x10
|
||||
|
||||
#define META_READER_LOCK 0x0
|
||||
#define META_READER_NOLOCK 0x1
|
||||
|
|
|
@ -130,7 +130,7 @@ static void tsdbClosePgCache(STsdb *pTsdb) {
|
|||
enum {
|
||||
LFLAG_LAST_ROW = 0,
|
||||
LFLAG_LAST = 1,
|
||||
LFLAG_PRIMARY_KEY = (1 << 4),
|
||||
LFLAG_PRIMARY_KEY = CACHESCAN_RETRIEVE_PK,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -387,6 +387,10 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
|
|||
}
|
||||
|
||||
int8_t ltype = (pr->type & CACHESCAN_RETRIEVE_LAST) >> 3;
|
||||
if (pr->rowKey.numOfPKs > 0) {
|
||||
ltype |= CACHESCAN_RETRIEVE_PK;
|
||||
}
|
||||
|
||||
STableKeyInfo* pTableList = pr->pTableList;
|
||||
|
||||
// retrieve the only one last row of all tables in the uid list.
|
||||
|
|
|
@ -160,6 +160,9 @@ SOperatorInfo* createCacherowsScanOperator(SLastRowScanPhysiNode* pScanNode, SRe
|
|||
// partition by tbname
|
||||
if (oneTableForEachGroup(pTableListInfo) || (totalTables == 1)) {
|
||||
pInfo->retrieveType = CACHESCAN_RETRIEVE_TYPE_ALL | SCAN_ROW_TYPE(pScanNode->ignoreNull);
|
||||
if (pInfo->numOfPks > 0) {
|
||||
pInfo->retrieveType |= CACHESCAN_RETRIEVE_PK;
|
||||
}
|
||||
|
||||
STableKeyInfo* pList = tableListGetInfo(pTableListInfo, 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue