fix: fix invalid dist count
This commit is contained in:
parent
04d4ee928b
commit
7d75939fae
|
@ -488,7 +488,7 @@ static int32_t initFilesetIterator(SFilesetIter* pIter, SArray* aDFileSet, STsdb
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t filesetIteratorNext(SFilesetIter* pIter, STsdbReader* pReader, bool *hasNext) {
|
static int32_t filesetIteratorNext(SFilesetIter* pIter, STsdbReader* pReader, bool* hasNext) {
|
||||||
bool asc = ASCENDING_TRAVERSE(pIter->order);
|
bool asc = ASCENDING_TRAVERSE(pIter->order);
|
||||||
int32_t step = asc ? 1 : -1;
|
int32_t step = asc ? 1 : -1;
|
||||||
pIter->index += step;
|
pIter->index += step;
|
||||||
|
@ -2802,7 +2802,7 @@ static int32_t moveToNextFile(STsdbReader* pReader, SBlockNumber* pBlockNum) {
|
||||||
SArray* pIndexList = taosArrayInit(numOfTables, sizeof(SBlockIdx));
|
SArray* pIndexList = taosArrayInit(numOfTables, sizeof(SBlockIdx));
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
bool hasNext = false;
|
bool hasNext = false;
|
||||||
int32_t code = filesetIteratorNext(&pStatus->fileIter, pReader, &hasNext);
|
int32_t code = filesetIteratorNext(&pStatus->fileIter, pReader, &hasNext);
|
||||||
if (code) {
|
if (code) {
|
||||||
taosArrayDestroy(pIndexList);
|
taosArrayDestroy(pIndexList);
|
||||||
|
@ -4688,6 +4688,11 @@ int32_t tsdbGetFileBlocksDistInfo(STsdbReader* pReader, STableBlockDistInfo* pTa
|
||||||
pTableBlockInfo->numOfVgroups = 1;
|
pTableBlockInfo->numOfVgroups = 1;
|
||||||
|
|
||||||
// find the start data block in file
|
// find the start data block in file
|
||||||
|
|
||||||
|
tsdbAcquireReader(pReader);
|
||||||
|
if (pReader->suspended) {
|
||||||
|
tsdbReaderResume(pReader);
|
||||||
|
}
|
||||||
SReaderStatus* pStatus = &pReader->status;
|
SReaderStatus* pStatus = &pReader->status;
|
||||||
|
|
||||||
STsdbCfg* pc = &pReader->pTsdb->pVnode->config.tsdbCfg;
|
STsdbCfg* pc = &pReader->pTsdb->pVnode->config.tsdbCfg;
|
||||||
|
@ -4749,7 +4754,7 @@ int32_t tsdbGetFileBlocksDistInfo(STsdbReader* pReader, STableBlockDistInfo* pTa
|
||||||
// tsdbDebug("%p %d blocks found in file for %d table(s), fid:%d, %s", pReader, numOfBlocks, numOfTables,
|
// tsdbDebug("%p %d blocks found in file for %d table(s), fid:%d, %s", pReader, numOfBlocks, numOfTables,
|
||||||
// pReader->pFileGroup->fid, pReader->idStr);
|
// pReader->pFileGroup->fid, pReader->idStr);
|
||||||
}
|
}
|
||||||
|
tsdbReleaseReader(pReader);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue