tsdb/commit: skip last tier ts data committing

This commit is contained in:
Minglei Jin 2023-10-23 15:46:32 +08:00
parent ee7258bb59
commit f630fc38f8
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);