fix(tsdb):set the initialized value.
This commit is contained in:
parent
43dc95869f
commit
a8433ec6eb
|
@ -296,8 +296,11 @@ static int32_t filesetIteratorNext(SFilesetIter* pIter, STsdbReader* pReader, bo
|
|||
pIter->pSttBlockReader->uid = 0;
|
||||
tMergeTreeClose(&pIter->pSttBlockReader->mergeTree);
|
||||
destroySttBlockReader(pReader->status.pLDataIterArray, &pCost->sttCost);
|
||||
pReader->status.pLDataIterArray = NULL;
|
||||
|
||||
pReader->status.pLDataIterArray = taosArrayInit(4, POINTER_BYTES);
|
||||
if (pReader->status.pLDataIterArray == NULL) {
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
// check file the time range of coverage
|
||||
STimeWindow win = {0};
|
||||
|
@ -711,6 +714,10 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
|||
return code;
|
||||
}
|
||||
|
||||
if (pRecord == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (pRecord->suid > pReader->info.suid) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -461,7 +461,7 @@ int32_t getNextBrinRecord(SBrinRecordIter* pIter, SBrinRecord** pRecord) {
|
|||
if (pIter->blockIndex == -1 || (pIter->recordIndex + 1) >= pIter->block.numOfRecords) {
|
||||
pIter->blockIndex += 1;
|
||||
if (pIter->blockIndex >= taosArrayGetSize(pIter->pBrinBlockList)) {
|
||||
return TSDB_CODE_FAILED;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
pIter->pCurrentBlk = taosArrayGet(pIter->pBrinBlockList, pIter->blockIndex);
|
||||
|
@ -470,7 +470,7 @@ int32_t getNextBrinRecord(SBrinRecordIter* pIter, SBrinRecord** pRecord) {
|
|||
int32_t code = tsdbDataFileReadBrinBlock(pIter->pReader, pIter->pCurrentBlk, &pIter->block);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
tsdbError("failed to read brinBlock from file, code:%s", tstrerror(code));
|
||||
return TSDB_CODE_FAILED;
|
||||
return code;
|
||||
}
|
||||
|
||||
pIter->recordIndex = -1;
|
||||
|
|
Loading…
Reference in New Issue