ehn: remove void
This commit is contained in:
parent
e8b50df6ca
commit
cccd2483d0
|
@ -115,7 +115,7 @@ typedef struct {
|
||||||
} SValueColumnCompressInfo;
|
} SValueColumnCompressInfo;
|
||||||
|
|
||||||
int32_t tValueColumnInit(SValueColumn *valCol);
|
int32_t tValueColumnInit(SValueColumn *valCol);
|
||||||
int32_t tValueColumnDestroy(SValueColumn *valCol);
|
void tValueColumnDestroy(SValueColumn *valCol);
|
||||||
void tValueColumnClear(SValueColumn *valCol);
|
void tValueColumnClear(SValueColumn *valCol);
|
||||||
int32_t tValueColumnAppend(SValueColumn *valCol, const SValue *value);
|
int32_t tValueColumnAppend(SValueColumn *valCol, const SValue *value);
|
||||||
int32_t tValueColumnUpdate(SValueColumn *valCol, int32_t idx, const SValue *value);
|
int32_t tValueColumnUpdate(SValueColumn *valCol, int32_t idx, const SValue *value);
|
||||||
|
|
|
@ -4171,12 +4171,12 @@ int32_t tValueColumnInit(SValueColumn *valCol) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tValueColumnDestroy(SValueColumn *valCol) {
|
void tValueColumnDestroy(SValueColumn *valCol) {
|
||||||
valCol->type = TSDB_DATA_TYPE_NULL;
|
valCol->type = TSDB_DATA_TYPE_NULL;
|
||||||
valCol->numOfValues = 0;
|
valCol->numOfValues = 0;
|
||||||
tBufferDestroy(&valCol->data);
|
tBufferDestroy(&valCol->data);
|
||||||
tBufferDestroy(&valCol->offsets);
|
tBufferDestroy(&valCol->offsets);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tValueColumnClear(SValueColumn *valCol) {
|
void tValueColumnClear(SValueColumn *valCol) {
|
||||||
|
|
|
@ -199,9 +199,9 @@ _exit:
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbCommitCloseReader(SCommitter2 *committer) {
|
static void tsdbCommitCloseReader(SCommitter2 *committer) {
|
||||||
TARRAY2_CLEAR(committer->sttReaderArray, tsdbSttFileReaderClose);
|
TARRAY2_CLEAR(committer->sttReaderArray, tsdbSttFileReaderClose);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbCommitOpenReader(SCommitter2 *committer) {
|
static int32_t tsdbCommitOpenReader(SCommitter2 *committer) {
|
||||||
|
@ -243,19 +243,19 @@ static int32_t tsdbCommitOpenReader(SCommitter2 *committer) {
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
TAOS_UNUSED(tsdbCommitCloseReader(committer));
|
tsdbCommitCloseReader(committer);
|
||||||
tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(committer->tsdb->pVnode), __func__, __FILE__, lino,
|
tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(committer->tsdb->pVnode), __func__, __FILE__, lino,
|
||||||
tstrerror(code));
|
tstrerror(code));
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbCommitCloseIter(SCommitter2 *committer) {
|
static void tsdbCommitCloseIter(SCommitter2 *committer) {
|
||||||
tsdbIterMergerClose(&committer->tombIterMerger);
|
tsdbIterMergerClose(&committer->tombIterMerger);
|
||||||
tsdbIterMergerClose(&committer->dataIterMerger);
|
tsdbIterMergerClose(&committer->dataIterMerger);
|
||||||
TARRAY2_CLEAR(committer->tombIterArray, tsdbIterClose);
|
TARRAY2_CLEAR(committer->tombIterArray, tsdbIterClose);
|
||||||
TARRAY2_CLEAR(committer->dataIterArray, tsdbIterClose);
|
TARRAY2_CLEAR(committer->dataIterArray, tsdbIterClose);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbCommitOpenIter(SCommitter2 *committer) {
|
static int32_t tsdbCommitOpenIter(SCommitter2 *committer) {
|
||||||
|
@ -309,7 +309,7 @@ static int32_t tsdbCommitOpenIter(SCommitter2 *committer) {
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
TAOS_UNUSED(tsdbCommitCloseIter(committer));
|
tsdbCommitCloseIter(committer);
|
||||||
tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(committer->tsdb->pVnode), __func__, __FILE__, lino,
|
tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(committer->tsdb->pVnode), __func__, __FILE__, lino,
|
||||||
tstrerror(code));
|
tstrerror(code));
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ static int32_t tsdbCommitFileSetBegin(SCommitter2 *committer) {
|
||||||
STsdb *tsdb = committer->tsdb;
|
STsdb *tsdb = committer->tsdb;
|
||||||
|
|
||||||
// check if can commit
|
// check if can commit
|
||||||
TAOS_UNUSED(tsdbFSCheckCommit(tsdb, committer->ctx->info->fid));
|
tsdbFSCheckCommit(tsdb, committer->ctx->info->fid);
|
||||||
|
|
||||||
committer->ctx->expLevel = tsdbFidLevel(committer->ctx->info->fid, &tsdb->keepCfg, committer->now);
|
committer->ctx->expLevel = tsdbFidLevel(committer->ctx->info->fid, &tsdb->keepCfg, committer->now);
|
||||||
tsdbFidKeyRange(committer->ctx->info->fid, committer->minutes, committer->precision, &committer->ctx->minKey,
|
tsdbFidKeyRange(committer->ctx->info->fid, committer->minutes, committer->precision, &committer->ctx->minKey,
|
||||||
|
@ -355,8 +355,8 @@ static int32_t tsdbCommitFileSetEnd(SCommitter2 *committer) {
|
||||||
int32_t lino = 0;
|
int32_t lino = 0;
|
||||||
|
|
||||||
TAOS_CHECK_GOTO(tsdbCommitCloseWriter(committer), &lino, _exit);
|
TAOS_CHECK_GOTO(tsdbCommitCloseWriter(committer), &lino, _exit);
|
||||||
TAOS_CHECK_GOTO(tsdbCommitCloseIter(committer), &lino, _exit);
|
tsdbCommitCloseIter(committer);
|
||||||
TAOS_CHECK_GOTO(tsdbCommitCloseReader(committer), &lino, _exit);
|
tsdbCommitCloseReader(committer);
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
|
@ -409,7 +409,7 @@ static uint32_t tFileSetCommitInfoHash(const void *arg) {
|
||||||
return MurmurHash3_32((const char *)&info->fid, sizeof(info->fid));
|
return MurmurHash3_32((const char *)&info->fid, sizeof(info->fid));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbCommitInfoDestroy(STsdb *pTsdb) {
|
static void tsdbCommitInfoDestroy(STsdb *pTsdb) {
|
||||||
if (pTsdb->commitInfo) {
|
if (pTsdb->commitInfo) {
|
||||||
for (int32_t i = 0; i < taosArrayGetSize(pTsdb->commitInfo->arr); i++) {
|
for (int32_t i = 0; i < taosArrayGetSize(pTsdb->commitInfo->arr); i++) {
|
||||||
SFileSetCommitInfo *info = *(SFileSetCommitInfo **)taosArrayGet(pTsdb->commitInfo->arr, i);
|
SFileSetCommitInfo *info = *(SFileSetCommitInfo **)taosArrayGet(pTsdb->commitInfo->arr, i);
|
||||||
|
@ -423,7 +423,7 @@ static int32_t tsdbCommitInfoDestroy(STsdb *pTsdb) {
|
||||||
pTsdb->commitInfo->arr = NULL;
|
pTsdb->commitInfo->arr = NULL;
|
||||||
taosMemoryFreeClear(pTsdb->commitInfo);
|
taosMemoryFreeClear(pTsdb->commitInfo);
|
||||||
}
|
}
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbCommitInfoInit(STsdb *pTsdb) {
|
static int32_t tsdbCommitInfoInit(STsdb *pTsdb) {
|
||||||
|
@ -444,7 +444,7 @@ static int32_t tsdbCommitInfoInit(STsdb *pTsdb) {
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
TAOS_UNUSED(tsdbCommitInfoDestroy(pTsdb));
|
tsdbCommitInfoDestroy(pTsdb);
|
||||||
tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(pTsdb->pVnode), __func__, __FILE__, lino, tstrerror(code));
|
tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(pTsdb->pVnode), __func__, __FILE__, lino, tstrerror(code));
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
|
@ -586,7 +586,7 @@ static int32_t tsdbCommitInfoBuild(STsdb *tsdb) {
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
TAOS_UNUSED(tsdbCommitInfoDestroy(tsdb));
|
tsdbCommitInfoDestroy(tsdb);
|
||||||
tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(tsdb->pVnode), __func__, __FILE__, lino, tstrerror(code));
|
tsdbError("vgId:%d %s failed at %s:%d since %s", TD_VID(tsdb->pVnode), __func__, __FILE__, lino, tstrerror(code));
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
|
@ -716,7 +716,7 @@ int32_t tsdbCommitCommit(STsdb *tsdb) {
|
||||||
|
|
||||||
(void)taosThreadMutexUnlock(&tsdb->mutex);
|
(void)taosThreadMutexUnlock(&tsdb->mutex);
|
||||||
|
|
||||||
TAOS_UNUSED(tsdbCommitInfoDestroy(tsdb));
|
TAOS_UNUSED();
|
||||||
tsdbUnrefMemTable(pMemTable, NULL, true);
|
tsdbUnrefMemTable(pMemTable, NULL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ int32_t tsdbCommitAbort(STsdb *pTsdb) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(void)taosThreadMutexUnlock(&pTsdb->mutex);
|
(void)taosThreadMutexUnlock(&pTsdb->mutex);
|
||||||
TAOS_UNUSED(tsdbCommitInfoDestroy(pTsdb));
|
tsdbCommitInfoDestroy(pTsdb);
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
|
|
|
@ -865,7 +865,7 @@ static void tsdbFSSetBlockCommit(STFileSet *fset, bool block) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tsdbFSCheckCommit(STsdb *tsdb, int32_t fid) {
|
void tsdbFSCheckCommit(STsdb *tsdb, int32_t fid) {
|
||||||
(void)taosThreadMutexLock(&tsdb->mutex);
|
(void)taosThreadMutexLock(&tsdb->mutex);
|
||||||
STFileSet *fset;
|
STFileSet *fset;
|
||||||
tsdbFSGetFSet(tsdb->pFS, fid, &fset);
|
tsdbFSGetFSet(tsdb->pFS, fid, &fset);
|
||||||
|
@ -877,7 +877,7 @@ int32_t tsdbFSCheckCommit(STsdb *tsdb, int32_t fid) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(void)taosThreadMutexUnlock(&tsdb->mutex);
|
(void)taosThreadMutexUnlock(&tsdb->mutex);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// IMPORTANT: the caller must hold fs->tsdb->mutex
|
// IMPORTANT: the caller must hold fs->tsdb->mutex
|
||||||
|
|
|
@ -60,7 +60,7 @@ int32_t tsdbFSEditCommit(STFileSystem *fs);
|
||||||
int32_t tsdbFSEditAbort(STFileSystem *fs);
|
int32_t tsdbFSEditAbort(STFileSystem *fs);
|
||||||
// other
|
// other
|
||||||
void tsdbFSGetFSet(STFileSystem *fs, int32_t fid, STFileSet **fset);
|
void tsdbFSGetFSet(STFileSystem *fs, int32_t fid, STFileSet **fset);
|
||||||
int32_t tsdbFSCheckCommit(STsdb *tsdb, int32_t fid);
|
void tsdbFSCheckCommit(STsdb *tsdb, int32_t fid);
|
||||||
void tsdbBeginTaskOnFileSet(STsdb *tsdb, int32_t fid, STFileSet **fset);
|
void tsdbBeginTaskOnFileSet(STsdb *tsdb, int32_t fid, STFileSet **fset);
|
||||||
void tsdbFinishTaskOnFileSet(STsdb *tsdb, int32_t fid);
|
void tsdbFinishTaskOnFileSet(STsdb *tsdb, int32_t fid);
|
||||||
// utils
|
// utils
|
||||||
|
|
|
@ -57,10 +57,10 @@ struct STsdbSnapReader {
|
||||||
STombBlock tombBlock[1];
|
STombBlock tombBlock[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
static int32_t tsdbSnapReadFileSetCloseReader(STsdbSnapReader* reader) {
|
static void tsdbSnapReadFileSetCloseReader(STsdbSnapReader* reader) {
|
||||||
TARRAY2_CLEAR(reader->sttReaderArr, tsdbSttFileReaderClose);
|
TARRAY2_CLEAR(reader->sttReaderArr, tsdbSttFileReaderClose);
|
||||||
tsdbDataFileReaderClose(&reader->dataReader);
|
tsdbDataFileReaderClose(&reader->dataReader);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbSnapReadFileSetOpenReader(STsdbSnapReader* reader) {
|
static int32_t tsdbSnapReadFileSetOpenReader(STsdbSnapReader* reader) {
|
||||||
|
@ -112,7 +112,7 @@ static int32_t tsdbSnapReadFileSetOpenReader(STsdbSnapReader* reader) {
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
TAOS_UNUSED(tsdbSnapReadFileSetCloseReader(reader));
|
tsdbSnapReadFileSetCloseReader(reader);
|
||||||
TSDB_ERROR_LOG(TD_VID(reader->tsdb->pVnode), code, lino);
|
TSDB_ERROR_LOG(TD_VID(reader->tsdb->pVnode), code, lino);
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
|
@ -190,12 +190,12 @@ _exit:
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbSnapReadFileSetCloseIter(STsdbSnapReader* reader) {
|
static void tsdbSnapReadFileSetCloseIter(STsdbSnapReader* reader) {
|
||||||
tsdbIterMergerClose(&reader->dataIterMerger);
|
tsdbIterMergerClose(&reader->dataIterMerger);
|
||||||
tsdbIterMergerClose(&reader->tombIterMerger);
|
tsdbIterMergerClose(&reader->tombIterMerger);
|
||||||
TARRAY2_CLEAR(reader->dataIterArr, tsdbIterClose);
|
TARRAY2_CLEAR(reader->dataIterArr, tsdbIterClose);
|
||||||
TARRAY2_CLEAR(reader->tombIterArr, tsdbIterClose);
|
TARRAY2_CLEAR(reader->tombIterArr, tsdbIterClose);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbSnapReadRangeBegin(STsdbSnapReader* reader) {
|
static int32_t tsdbSnapReadRangeBegin(STsdbSnapReader* reader) {
|
||||||
|
@ -222,8 +222,8 @@ _exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tsdbSnapReadRangeEnd(STsdbSnapReader* reader) {
|
static int32_t tsdbSnapReadRangeEnd(STsdbSnapReader* reader) {
|
||||||
TAOS_UNUSED(tsdbSnapReadFileSetCloseIter(reader));
|
tsdbSnapReadFileSetCloseIter(reader);
|
||||||
TAOS_UNUSED(tsdbSnapReadFileSetCloseReader(reader));
|
tsdbSnapReadFileSetCloseReader(reader);
|
||||||
reader->ctx->fsr = NULL;
|
reader->ctx->fsr = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -373,7 +373,7 @@ static int32_t tsdbSnapReadTombData(STsdbSnapReader* reader, uint8_t** data) {
|
||||||
int32_t lino = 0;
|
int32_t lino = 0;
|
||||||
SMetaInfo info;
|
SMetaInfo info;
|
||||||
|
|
||||||
TAOS_UNUSED(tTombBlockClear(reader->tombBlock));
|
tTombBlockClear(reader->tombBlock);
|
||||||
|
|
||||||
TABLEID tbid[1] = {0};
|
TABLEID tbid[1] = {0};
|
||||||
for (STombRecord* record; (record = tsdbIterMergerGetTombRecord(reader->tombIterMerger)) != NULL;) {
|
for (STombRecord* record; (record = tsdbIterMergerGetTombRecord(reader->tombIterMerger)) != NULL;) {
|
||||||
|
@ -463,7 +463,7 @@ void tsdbSnapReaderClose(STsdbSnapReader** reader) {
|
||||||
tDestroyTSchema(reader[0]->skmTb->pTSchema);
|
tDestroyTSchema(reader[0]->skmTb->pTSchema);
|
||||||
|
|
||||||
for (int32_t i = 0; i < ARRAY_SIZE(reader[0]->buffers); ++i) {
|
for (int32_t i = 0; i < ARRAY_SIZE(reader[0]->buffers); ++i) {
|
||||||
TAOS_UNUSED(tBufferDestroy(reader[0]->buffers + i));
|
tBufferDestroy(reader[0]->buffers + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
taosMemoryFree(reader[0]);
|
taosMemoryFree(reader[0]);
|
||||||
|
@ -1000,7 +1000,7 @@ static int32_t tsdbSnapWriteDecmprTombBlock(SSnapDataHdr* hdr, STombBlock* tombB
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
int32_t lino = 0;
|
int32_t lino = 0;
|
||||||
|
|
||||||
TAOS_UNUSED(tTombBlockClear(tombBlock));
|
tTombBlockClear(tombBlock);
|
||||||
|
|
||||||
int64_t size = hdr->size;
|
int64_t size = hdr->size;
|
||||||
size = size / TOMB_RECORD_ELEM_NUM;
|
size = size / TOMB_RECORD_ELEM_NUM;
|
||||||
|
|
|
@ -415,7 +415,7 @@ int32_t tsdbSttFileReadStatisBlock(SSttFileReader *reader, const SStatisBlk *sta
|
||||||
&lino, _exit);
|
&lino, _exit);
|
||||||
|
|
||||||
// decode data
|
// decode data
|
||||||
TAOS_UNUSED(tStatisBlockClear(statisBlock));
|
tStatisBlockClear(statisBlock);
|
||||||
statisBlock->numOfPKs = statisBlk->numOfPKs;
|
statisBlock->numOfPKs = statisBlk->numOfPKs;
|
||||||
statisBlock->numOfRecords = statisBlk->numRec;
|
statisBlock->numOfRecords = statisBlk->numRec;
|
||||||
SBufferReader br = BUFFER_READER_INITIALIZER(0, buffer0);
|
SBufferReader br = BUFFER_READER_INITIALIZER(0, buffer0);
|
||||||
|
@ -654,7 +654,7 @@ static int32_t tsdbSttFileDoWriteStatisBlock(SSttFileWriter *writer) {
|
||||||
|
|
||||||
TAOS_CHECK_GOTO(TARRAY2_APPEND_PTR(writer->statisBlkArray, &statisBlk), &lino, _exit);
|
TAOS_CHECK_GOTO(TARRAY2_APPEND_PTR(writer->statisBlkArray, &statisBlk), &lino, _exit);
|
||||||
|
|
||||||
TAOS_UNUSED(tStatisBlockClear(writer->staticBlock));
|
tStatisBlockClear(writer->staticBlock);
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
|
|
|
@ -93,25 +93,25 @@ void tStatisBlockDestroy(STbStatisBlock *statisBlock) {
|
||||||
statisBlock->numOfPKs = 0;
|
statisBlock->numOfPKs = 0;
|
||||||
statisBlock->numOfRecords = 0;
|
statisBlock->numOfRecords = 0;
|
||||||
for (int32_t i = 0; i < ARRAY_SIZE(statisBlock->buffers); ++i) {
|
for (int32_t i = 0; i < ARRAY_SIZE(statisBlock->buffers); ++i) {
|
||||||
TAOS_UNUSED(tBufferDestroy(&statisBlock->buffers[i]));
|
tBufferDestroy(&statisBlock->buffers[i]);
|
||||||
}
|
}
|
||||||
for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) {
|
for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) {
|
||||||
TAOS_UNUSED(tValueColumnDestroy(&statisBlock->firstKeyPKs[i]));
|
tValueColumnDestroy(&statisBlock->firstKeyPKs[i]);
|
||||||
TAOS_UNUSED(tValueColumnDestroy(&statisBlock->lastKeyPKs[i]));
|
tValueColumnDestroy(&statisBlock->lastKeyPKs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tStatisBlockClear(STbStatisBlock *statisBlock) {
|
void tStatisBlockClear(STbStatisBlock *statisBlock) {
|
||||||
statisBlock->numOfPKs = 0;
|
statisBlock->numOfPKs = 0;
|
||||||
statisBlock->numOfRecords = 0;
|
statisBlock->numOfRecords = 0;
|
||||||
for (int32_t i = 0; i < ARRAY_SIZE(statisBlock->buffers); ++i) {
|
for (int32_t i = 0; i < ARRAY_SIZE(statisBlock->buffers); ++i) {
|
||||||
TAOS_UNUSED(tBufferClear(&statisBlock->buffers[i]));
|
tBufferClear(&statisBlock->buffers[i]);
|
||||||
}
|
}
|
||||||
for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) {
|
for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) {
|
||||||
tValueColumnClear(&statisBlock->firstKeyPKs[i]);
|
tValueColumnClear(&statisBlock->firstKeyPKs[i]);
|
||||||
tValueColumnClear(&statisBlock->lastKeyPKs[i]);
|
tValueColumnClear(&statisBlock->lastKeyPKs[i]);
|
||||||
}
|
}
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tStatisBlockAppend(STbStatisBlock *block, SRowInfo *row) {
|
static int32_t tStatisBlockAppend(STbStatisBlock *block, SRowInfo *row) {
|
||||||
|
@ -252,11 +252,11 @@ void tBrinBlockDestroy(SBrinBlock *brinBlock) {
|
||||||
brinBlock->numOfPKs = 0;
|
brinBlock->numOfPKs = 0;
|
||||||
brinBlock->numOfRecords = 0;
|
brinBlock->numOfRecords = 0;
|
||||||
for (int32_t i = 0; i < ARRAY_SIZE(brinBlock->buffers); ++i) {
|
for (int32_t i = 0; i < ARRAY_SIZE(brinBlock->buffers); ++i) {
|
||||||
TAOS_UNUSED(tBufferDestroy(&brinBlock->buffers[i]));
|
tBufferDestroy(&brinBlock->buffers[i]);
|
||||||
}
|
}
|
||||||
for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) {
|
for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) {
|
||||||
TAOS_UNUSED(tValueColumnDestroy(&brinBlock->firstKeyPKs[i]));
|
tValueColumnDestroy(&brinBlock->firstKeyPKs[i]);
|
||||||
TAOS_UNUSED(tValueColumnDestroy(&brinBlock->lastKeyPKs[i]));
|
tValueColumnDestroy(&brinBlock->lastKeyPKs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ void tBrinBlockClear(SBrinBlock *brinBlock) {
|
||||||
brinBlock->numOfPKs = 0;
|
brinBlock->numOfPKs = 0;
|
||||||
brinBlock->numOfRecords = 0;
|
brinBlock->numOfRecords = 0;
|
||||||
for (int32_t i = 0; i < ARRAY_SIZE(brinBlock->buffers); ++i) {
|
for (int32_t i = 0; i < ARRAY_SIZE(brinBlock->buffers); ++i) {
|
||||||
TAOS_UNUSED(tBufferClear(&brinBlock->buffers[i]));
|
tBufferClear(&brinBlock->buffers[i]);
|
||||||
}
|
}
|
||||||
for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) {
|
for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) {
|
||||||
tValueColumnClear(&brinBlock->firstKeyPKs[i]);
|
tValueColumnClear(&brinBlock->firstKeyPKs[i]);
|
||||||
|
|
|
@ -113,7 +113,7 @@ typedef struct {
|
||||||
|
|
||||||
int32_t tStatisBlockInit(STbStatisBlock *statisBlock);
|
int32_t tStatisBlockInit(STbStatisBlock *statisBlock);
|
||||||
void tStatisBlockDestroy(STbStatisBlock *statisBlock);
|
void tStatisBlockDestroy(STbStatisBlock *statisBlock);
|
||||||
int32_t tStatisBlockClear(STbStatisBlock *statisBlock);
|
void tStatisBlockClear(STbStatisBlock *statisBlock);
|
||||||
int32_t tStatisBlockPut(STbStatisBlock *statisBlock, SRowInfo *row, int32_t maxRecords);
|
int32_t tStatisBlockPut(STbStatisBlock *statisBlock, SRowInfo *row, int32_t maxRecords);
|
||||||
int32_t tStatisBlockGet(STbStatisBlock *statisBlock, int32_t idx, STbStatisRecord *record);
|
int32_t tStatisBlockGet(STbStatisBlock *statisBlock, int32_t idx, STbStatisRecord *record);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue