fixup: remove minVer and maxVer in FSetWriterConfig

This commit is contained in:
Benguang Zhao 2023-08-31 10:25:53 +08:00
parent c8a46394f1
commit 1446b44733
5 changed files with 4 additions and 20 deletions

View File

@ -527,16 +527,10 @@ struct SSnapDataHdr {
uint8_t data[]; uint8_t data[];
}; };
typedef struct SRange {
int64_t start;
int64_t end;
} SRange;
struct SCommitInfo { struct SCommitInfo {
SVnodeInfo info; SVnodeInfo info;
SVnode* pVnode; SVnode* pVnode;
TXN* txn; TXN* txn;
SRange vers;
}; };
struct SCompactInfo { struct SCompactInfo {

View File

@ -76,8 +76,6 @@ static int32_t tsdbCommitOpenWriter(SCommitter2 *committer) {
.szPage = committer->szPage, .szPage = committer->szPage,
.cmprAlg = committer->cmprAlg, .cmprAlg = committer->cmprAlg,
.fid = committer->ctx->fid, .fid = committer->ctx->fid,
.minVer = committer->ctx->minVer,
.maxVer = committer->ctx->maxVer,
.cid = committer->ctx->cid, .cid = committer->ctx->cid,
.did = committer->ctx->did, .did = committer->ctx->did,
.level = 0, .level = 0,
@ -91,8 +89,6 @@ static int32_t tsdbCommitOpenWriter(SCommitter2 *committer) {
if (committer->ctx->fset->farr[ftype] != NULL) { if (committer->ctx->fset->farr[ftype] != NULL) {
config.files[ftype].exist = true; config.files[ftype].exist = true;
config.files[ftype].file = committer->ctx->fset->farr[ftype]->f[0]; config.files[ftype].file = committer->ctx->fset->farr[ftype]->f[0];
config.files[ftype].file.minVer = TMIN(config.files[ftype].file.minVer, config.minVer);
config.files[ftype].file.maxVer = TMAX(config.files[ftype].file.maxVer, config.maxVer);
} }
} }
} }
@ -469,8 +465,6 @@ static int32_t tsdbOpenCommitter(STsdb *tsdb, SCommitInfo *info, SCommitter2 *co
committer->compactVersion = INT64_MAX; committer->compactVersion = INT64_MAX;
committer->ctx->cid = tsdbFSAllocEid(tsdb->pFS); committer->ctx->cid = tsdbFSAllocEid(tsdb->pFS);
committer->ctx->now = taosGetTimestampSec(); committer->ctx->now = taosGetTimestampSec();
committer->ctx->minVer = info->vers.start;
committer->ctx->maxVer = info->vers.end;
committer->ctx->nextKey = tsdb->imem->minKey; committer->ctx->nextKey = tsdb->imem->minKey;
if (tsdb->imem->nDel > 0) { if (tsdb->imem->nDel > 0) {

View File

@ -143,8 +143,8 @@ int32_t tsdbFSetWriterOpen(SFSetWriterConfig *config, SFSetWriter **writer) {
.maxRow = config->maxRow, .maxRow = config->maxRow,
.szPage = config->szPage, .szPage = config->szPage,
.fid = config->fid, .fid = config->fid,
.minVer = config->minVer, .minVer = VERSION_MAX,
.maxVer = config->maxVer, .maxVer = VERSION_MIN,
.cid = config->cid, .cid = config->cid,
.did = config->did, .did = config->did,
.compactVersion = config->compactVersion, .compactVersion = config->compactVersion,
@ -170,8 +170,8 @@ int32_t tsdbFSetWriterOpen(SFSetWriterConfig *config, SFSetWriter **writer) {
.compactVersion = config->compactVersion, .compactVersion = config->compactVersion,
.did = config->did, .did = config->did,
.fid = config->fid, .fid = config->fid,
.minVer = config->minVer, .minVer = VERSION_MAX,
.maxVer = config->maxVer, .maxVer = VERSION_MIN,
.cid = config->cid, .cid = config->cid,
.level = config->level, .level = config->level,
.skmTb = writer[0]->skmTb, .skmTb = writer[0]->skmTb,

View File

@ -34,8 +34,6 @@ typedef struct {
int32_t szPage; int32_t szPage;
int8_t cmprAlg; int8_t cmprAlg;
int32_t fid; int32_t fid;
int64_t minVer;
int64_t maxVer;
int64_t cid; int64_t cid;
SDiskID did; SDiskID did;
int32_t level; int32_t level;

View File

@ -297,8 +297,6 @@ static int32_t vnodePrepareCommit(SVnode *pVnode, SCommitInfo *pInfo) {
pInfo->info.state.committed = pVnode->state.applied; pInfo->info.state.committed = pVnode->state.applied;
pInfo->info.state.commitTerm = pVnode->state.applyTerm; pInfo->info.state.commitTerm = pVnode->state.applyTerm;
pInfo->info.state.commitID = ++pVnode->state.commitID; pInfo->info.state.commitID = ++pVnode->state.commitID;
pInfo->vers.start = lastCommitted + 1;
pInfo->vers.end = pInfo->info.state.committed;
pInfo->pVnode = pVnode; pInfo->pVnode = pVnode;
pInfo->txn = metaGetTxn(pVnode->pMeta); pInfo->txn = metaGetTxn(pVnode->pMeta);