Merge pull request #23366 from taosdata/fix/TD-26669

tsdb/commit: skip last tier ts data committing
This commit is contained in:
Hongze Cheng 2023-10-24 01:29:01 -05:00 committed by GitHub
commit e7e7748e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -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);
if (ts > committer->ctx->maxKey) {
if (ts > committer->ctx->maxKey || skipRow) {
committer->ctx->nextKey = TMIN(committer->ctx->nextKey, ts);
code = tsdbIterMergerSkipTableData(committer->dataIterMerger, committer->ctx->tbid);
TSDB_CHECK_CODE(code, lino, _exit);