diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit2.c b/source/dnode/vnode/src/tsdb/tsdbCommit2.c index 8a9dbf37b9b4ffb2691024cea8d6ff6f9436d001..98cd48c622238990d2b025ac038b5465983e630f 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCommit2.c +++ b/source/dnode/vnode/src/tsdb/tsdbCommit2.c @@ -189,6 +189,10 @@ static int32_t tsdbCommitTombData(SCommitter2 *committer) { committer->ctx->maxKey = committer->ctx->maxKey + 1; } + if (record->ekey > committer->ctx->maxKey) { + committer->ctx->nextKey = committer->ctx->maxKey; + } + record->skey = TMAX(record->skey, committer->ctx->minKey); record->ekey = TMIN(record->ekey, committer->ctx->maxKey); @@ -602,4 +606,4 @@ _exit: tsdbInfo("vgId:%d %s done", TD_VID(pTsdb->pVnode), __func__); } return code; -} \ No newline at end of file +}