From a33ce92e5d49062e7c5805f7ed7bb044d4e6a740 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 20 Jun 2023 13:33:31 +0800 Subject: [PATCH] more code --- source/dnode/vnode/src/tsdb/tsdbCommit2.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit2.c b/source/dnode/vnode/src/tsdb/tsdbCommit2.c index 5e4b3ad468..4de7705919 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCommit2.c +++ b/source/dnode/vnode/src/tsdb/tsdbCommit2.c @@ -141,6 +141,20 @@ static int32_t tsdbCommitTombData(SCommitter2 *committer) { int32_t lino = 0; for (STombRecord *record; (record = tsdbIterMergerGetTombRecord(committer->tombIterMerger));) { + if (record->ekey < committer->ctx->minKey) { + continue; + } else if (record->skey > committer->ctx->maxKey) { + committer->ctx->maxKey = TMIN(record->skey, committer->ctx->maxKey); + continue; + } + + if (record->ekey > committer->ctx->maxKey) { + committer->ctx->maxKey = committer->ctx->maxKey + 1; + } + + record->skey = TMAX(record->skey, committer->ctx->minKey); + record->ekey = TMIN(record->ekey, committer->ctx->maxKey); + code = tsdbFSetWriteTombRecord(committer->writer, record); TSDB_CHECK_CODE(code, lino, _exit); -- GitLab