From 32a256bfeebd69360316a5c8b7781a68be820611 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 21 Jun 2023 16:55:31 +0800 Subject: [PATCH] fix commit bug --- source/dnode/vnode/src/tsdb/tsdbCommit2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit2.c b/source/dnode/vnode/src/tsdb/tsdbCommit2.c index db7abf443c..e316a79d92 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCommit2.c +++ b/source/dnode/vnode/src/tsdb/tsdbCommit2.c @@ -122,6 +122,14 @@ static int32_t tsdbCommitTSData(SCommitter2 *committer) { committer->ctx->tbid->uid = row->uid; } + int64_t ts = TSDBROW_TS(&row->row); + if (ts > committer->ctx->maxKey) { + committer->ctx->nextKey = TMIN(committer->ctx->nextKey, ts); + code = tsdbIterMergerSkipTableData(committer->dataIterMerger, (TABLEID *)row); + TSDB_CHECK_CODE(code, lino, _exit); + continue; + } + code = tsdbFSetWriteRow(committer->writer, row); TSDB_CHECK_CODE(code, lino, _exit); -- GitLab