fix: remove multi-reader since two level merge is used
This commit is contained in:
parent
0b61b88c10
commit
376688479c
|
@ -55,7 +55,6 @@ typedef struct STableMergeScanSortSourceParam {
|
||||||
int32_t readerIdx;
|
int32_t readerIdx;
|
||||||
uint64_t uid;
|
uint64_t uid;
|
||||||
SSDataBlock* inputBlock;
|
SSDataBlock* inputBlock;
|
||||||
bool multiReader;
|
|
||||||
STsdbReader* dataReader;
|
STsdbReader* dataReader;
|
||||||
} STableMergeScanSortSourceParam;
|
} STableMergeScanSortSourceParam;
|
||||||
|
|
||||||
|
@ -2653,8 +2652,7 @@ static SSDataBlock* getTableDataBlockImpl(void* param) {
|
||||||
int64_t st = taosGetTimestampUs();
|
int64_t st = taosGetTimestampUs();
|
||||||
void* p = tableListGetInfo(pInfo->base.pTableListInfo, readIdx + pInfo->tableStartIndex);
|
void* p = tableListGetInfo(pInfo->base.pTableListInfo, readIdx + pInfo->tableStartIndex);
|
||||||
SReadHandle* pHandle = &pInfo->base.readHandle;
|
SReadHandle* pHandle = &pInfo->base.readHandle;
|
||||||
source->multiReader = true;
|
if (NULL == source->dataReader) {
|
||||||
if (NULL == source->dataReader || !source->multiReader) {
|
|
||||||
code = pAPI->tsdReader.tsdReaderOpen(pHandle->vnode, pQueryCond, p, 1, pBlock, (void**)&source->dataReader, GET_TASKID(pTaskInfo), false, NULL);
|
code = pAPI->tsdReader.tsdReaderOpen(pHandle->vnode, pQueryCond, p, 1, pBlock, (void**)&source->dataReader, GET_TASKID(pTaskInfo), false, NULL);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
T_LONG_JMP(pTaskInfo->env, code);
|
T_LONG_JMP(pTaskInfo->env, code);
|
||||||
|
@ -2718,22 +2716,14 @@ static SSDataBlock* getTableDataBlockImpl(void* param) {
|
||||||
pInfo->base.readRecorder.elapsedTime += (taosGetTimestampUs() - st) / 1000.0;
|
pInfo->base.readRecorder.elapsedTime += (taosGetTimestampUs() - st) / 1000.0;
|
||||||
|
|
||||||
qTrace("tsdb/read-table-data: %p, close reader", reader);
|
qTrace("tsdb/read-table-data: %p, close reader", reader);
|
||||||
if (!source->multiReader) {
|
|
||||||
pAPI->tsdReader.tsdReaderClose(pInfo->base.dataReader);
|
|
||||||
source->dataReader = NULL;
|
|
||||||
}
|
|
||||||
pInfo->base.dataReader = NULL;
|
pInfo->base.dataReader = NULL;
|
||||||
return pBlock;
|
return pBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!source->multiReader) {
|
|
||||||
pAPI->tsdReader.tsdReaderClose(pInfo->base.dataReader);
|
|
||||||
source->dataReader = NULL;
|
|
||||||
}
|
|
||||||
pInfo->base.dataReader = NULL;
|
|
||||||
|
|
||||||
pAPI->tsdReader.tsdReaderClose(source->dataReader);
|
pAPI->tsdReader.tsdReaderClose(source->dataReader);
|
||||||
source->dataReader = NULL;
|
source->dataReader = NULL;
|
||||||
|
pInfo->base.dataReader = NULL;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2805,7 +2795,6 @@ int32_t startGroupTableMergeScan(SOperatorInfo* pOperator) {
|
||||||
STableMergeScanSortSourceParam param = {0};
|
STableMergeScanSortSourceParam param = {0};
|
||||||
param.readerIdx = i;
|
param.readerIdx = i;
|
||||||
param.pOperator = pOperator;
|
param.pOperator = pOperator;
|
||||||
param.multiReader = (numOfTable <= MULTI_READER_MAX_TABLE_NUM) ? true : false;
|
|
||||||
param.inputBlock = createOneDataBlock(pInfo->pResBlock, false);
|
param.inputBlock = createOneDataBlock(pInfo->pResBlock, false);
|
||||||
blockDataEnsureCapacity(param.inputBlock, pOperator->resultInfo.capacity);
|
blockDataEnsureCapacity(param.inputBlock, pOperator->resultInfo.capacity);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue