fix(tsdb/pageSize): use tsdbPageSize instead of szPage(tdb's)
This commit is contained in:
parent
7ea9cf1ddc
commit
1bce96ea27
|
@ -1950,7 +1950,7 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlie
|
||||||
STFileObj **pFileObj = state->pFileSet->farr;
|
STFileObj **pFileObj = state->pFileSet->farr;
|
||||||
if (pFileObj[0] != NULL || pFileObj[3] != NULL) {
|
if (pFileObj[0] != NULL || pFileObj[3] != NULL) {
|
||||||
if (state->pFileSet != state->pr->pCurFileSet) {
|
if (state->pFileSet != state->pr->pCurFileSet) {
|
||||||
SDataFileReaderConfig conf = {.tsdb = state->pTsdb, .szPage = state->pTsdb->pVnode->config.szPage};
|
SDataFileReaderConfig conf = {.tsdb = state->pTsdb, .szPage = state->pTsdb->pVnode->config.tsdbPageSize};
|
||||||
const char *filesName[4] = {0};
|
const char *filesName[4] = {0};
|
||||||
if (pFileObj[0] != NULL) {
|
if (pFileObj[0] != NULL) {
|
||||||
conf.files[0].file = *pFileObj[0]->f;
|
conf.files[0].file = *pFileObj[0]->f;
|
||||||
|
|
|
@ -352,9 +352,9 @@ static int32_t extractSttBlockInfo(SLDataIter *pIter, const TSttBlkArray *pArray
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t uidComparFn(const void* p1, const void* p2) {
|
static int32_t uidComparFn(const void *p1, const void *p2) {
|
||||||
const uint64_t* uid1 = p1;
|
const uint64_t *uid1 = p1;
|
||||||
const uint64_t* uid2 = p2;
|
const uint64_t *uid2 = p2;
|
||||||
return (*uid1) - (*uid2);
|
return (*uid1) - (*uid2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,16 +372,16 @@ static bool existsFromSttBlkStatis(const TStatisBlkArray *pStatisBlkArray, uint6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// for (; i < TARRAY2_SIZE(pStatisBlkArray); ++i) {
|
// for (; i < TARRAY2_SIZE(pStatisBlkArray); ++i) {
|
||||||
// SStatisBlk *p = &pStatisBlkArray->data[i];
|
// SStatisBlk *p = &pStatisBlkArray->data[i];
|
||||||
// if (p->minTbid.uid <= uid && p->maxTbid.uid >= uid) {
|
// if (p->minTbid.uid <= uid && p->maxTbid.uid >= uid) {
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// if (p->maxTbid.uid < uid) {
|
// if (p->maxTbid.uid < uid) {
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (i >= TARRAY2_SIZE(pStatisBlkArray)) {
|
if (i >= TARRAY2_SIZE(pStatisBlkArray)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -416,7 +416,7 @@ int32_t tLDataIterOpen2(struct SLDataIter *pIter, SSttFileReader *pSttFileReader
|
||||||
if (!pBlockLoadInfo->sttBlockLoaded) {
|
if (!pBlockLoadInfo->sttBlockLoaded) {
|
||||||
int64_t st = taosGetTimestampUs();
|
int64_t st = taosGetTimestampUs();
|
||||||
|
|
||||||
const TSttBlkArray*pSttBlkArray = NULL;
|
const TSttBlkArray *pSttBlkArray = NULL;
|
||||||
pBlockLoadInfo->sttBlockLoaded = true;
|
pBlockLoadInfo->sttBlockLoaded = true;
|
||||||
|
|
||||||
// load the stt block info for each stt-block
|
// load the stt block info for each stt-block
|
||||||
|
@ -445,12 +445,12 @@ int32_t tLDataIterOpen2(struct SLDataIter *pIter, SSttFileReader *pSttFileReader
|
||||||
tsdbDebug("load the stt file info completed, elapsed time:%.2fms, %s", el, idStr);
|
tsdbDebug("load the stt file info completed, elapsed time:%.2fms, %s", el, idStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// bool exists = existsFromSttBlkStatis(pBlockLoadInfo->pSttStatisBlkArray, suid, uid, pIter->pReader);
|
// bool exists = existsFromSttBlkStatis(pBlockLoadInfo->pSttStatisBlkArray, suid, uid, pIter->pReader);
|
||||||
// if (!exists) {
|
// if (!exists) {
|
||||||
// pIter->iSttBlk = -1;
|
// pIter->iSttBlk = -1;
|
||||||
// pIter->pSttBlk = NULL;
|
// pIter->pSttBlk = NULL;
|
||||||
// return TSDB_CODE_SUCCESS;
|
// return TSDB_CODE_SUCCESS;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// find the start block, actually we could load the position to avoid repeatly searching for the start position when
|
// find the start block, actually we could load the position to avoid repeatly searching for the start position when
|
||||||
// the skey is updated.
|
// the skey is updated.
|
||||||
|
@ -794,7 +794,7 @@ int32_t tMergeTreeOpen2(SMergeTree *pMTree, SMergeTreeConf *pConf) {
|
||||||
|
|
||||||
// open stt file reader if not
|
// open stt file reader if not
|
||||||
if (pSttFileReader == NULL) {
|
if (pSttFileReader == NULL) {
|
||||||
SSttFileReaderConfig conf = {.tsdb = pConf->pTsdb, .szPage = pConf->pTsdb->pVnode->config.szPage};
|
SSttFileReaderConfig conf = {.tsdb = pConf->pTsdb, .szPage = pConf->pTsdb->pVnode->config.tsdbPageSize};
|
||||||
conf.file[0] = *pSttLevel->fobjArr->data[i]->f;
|
conf.file[0] = *pSttLevel->fobjArr->data[i]->f;
|
||||||
|
|
||||||
code = tsdbSttFileReaderOpen(pSttLevel->fobjArr->data[i]->fname, &conf, &pSttFileReader);
|
code = tsdbSttFileReaderOpen(pSttLevel->fobjArr->data[i]->fname, &conf, &pSttFileReader);
|
||||||
|
|
|
@ -189,7 +189,7 @@ static int32_t filesetIteratorNext(SFilesetIter* pIter, STsdbReader* pReader, bo
|
||||||
|
|
||||||
STFileObj** pFileObj = pReader->status.pCurrentFileset->farr;
|
STFileObj** pFileObj = pReader->status.pCurrentFileset->farr;
|
||||||
if (pFileObj[0] != NULL || pFileObj[3] != NULL) {
|
if (pFileObj[0] != NULL || pFileObj[3] != NULL) {
|
||||||
SDataFileReaderConfig conf = {.tsdb = pReader->pTsdb, .szPage = pReader->pTsdb->pVnode->config.szPage};
|
SDataFileReaderConfig conf = {.tsdb = pReader->pTsdb, .szPage = pReader->pTsdb->pVnode->config.tsdbPageSize};
|
||||||
|
|
||||||
const char* filesName[4] = {0};
|
const char* filesName[4] = {0};
|
||||||
|
|
||||||
|
|
|
@ -749,7 +749,7 @@ int32_t tsdbDFileSetCopy(STsdb *pTsdb, SDFileSet *pSetFrom, SDFileSet *pSetTo) {
|
||||||
int64_t size;
|
int64_t size;
|
||||||
TdFilePtr pOutFD = NULL;
|
TdFilePtr pOutFD = NULL;
|
||||||
TdFilePtr PInFD = NULL;
|
TdFilePtr PInFD = NULL;
|
||||||
int32_t szPage = pTsdb->pVnode->config.szPage;
|
int32_t szPage = pTsdb->pVnode->config.tsdbPageSize;
|
||||||
char fNameFrom[TSDB_FILENAME_LEN];
|
char fNameFrom[TSDB_FILENAME_LEN];
|
||||||
char fNameTo[TSDB_FILENAME_LEN];
|
char fNameTo[TSDB_FILENAME_LEN];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue