Merge pull request #23366 from taosdata/fix/TD-26669
tsdb/commit: skip last tier ts data committing
This commit is contained in:
commit
e7e7748e6d
|
@ -128,8 +128,16 @@ static int32_t tsdbCommitTSData(SCommitter2 *committer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern int8_t tsS3Enabled;
|
||||||
|
|
||||||
|
int32_t nlevel = tfsGetLevel(committer->tsdb->pVnode->pTfs);
|
||||||
|
bool skipRow = false;
|
||||||
|
if (tsS3Enabled && nlevel > 1 && committer->ctx->did.level == nlevel - 1) {
|
||||||
|
skipRow = true;
|
||||||
|
}
|
||||||
|
|
||||||
int64_t ts = TSDBROW_TS(&row->row);
|
int64_t ts = TSDBROW_TS(&row->row);
|
||||||
if (ts > committer->ctx->maxKey) {
|
if (ts > committer->ctx->maxKey || skipRow) {
|
||||||
committer->ctx->nextKey = TMIN(committer->ctx->nextKey, ts);
|
committer->ctx->nextKey = TMIN(committer->ctx->nextKey, ts);
|
||||||
code = tsdbIterMergerSkipTableData(committer->dataIterMerger, committer->ctx->tbid);
|
code = tsdbIterMergerSkipTableData(committer->dataIterMerger, committer->ctx->tbid);
|
||||||
TSDB_CHECK_CODE(code, lino, _exit);
|
TSDB_CHECK_CODE(code, lino, _exit);
|
||||||
|
|
Loading…
Reference in New Issue