more code

This commit is contained in:
Hongze Cheng 2023-06-20 13:33:31 +08:00
parent 927f6861be
commit a33ce92e5d
1 changed files with 14 additions and 0 deletions

View File

@ -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);