提交 5e9d263e 编写于 作者: H Hongze Cheng

fix: infinite loop

上级 0e97340e
...@@ -142,10 +142,10 @@ static int32_t tsdbCommitTombData(SCommitter2 *committer) { ...@@ -142,10 +142,10 @@ static int32_t tsdbCommitTombData(SCommitter2 *committer) {
for (STombRecord *record; (record = tsdbIterMergerGetTombRecord(committer->tombIterMerger));) { for (STombRecord *record; (record = tsdbIterMergerGetTombRecord(committer->tombIterMerger));) {
if (record->ekey < committer->ctx->minKey) { if (record->ekey < committer->ctx->minKey) {
continue; goto _next;
} else if (record->skey > committer->ctx->maxKey) { } else if (record->skey > committer->ctx->maxKey) {
committer->ctx->maxKey = TMIN(record->skey, committer->ctx->maxKey); committer->ctx->maxKey = TMIN(record->skey, committer->ctx->maxKey);
continue; goto _next;
} }
if (record->ekey > committer->ctx->maxKey) { if (record->ekey > committer->ctx->maxKey) {
...@@ -158,6 +158,7 @@ static int32_t tsdbCommitTombData(SCommitter2 *committer) { ...@@ -158,6 +158,7 @@ static int32_t tsdbCommitTombData(SCommitter2 *committer) {
code = tsdbFSetWriteTombRecord(committer->writer, record); code = tsdbFSetWriteTombRecord(committer->writer, record);
TSDB_CHECK_CODE(code, lino, _exit); TSDB_CHECK_CODE(code, lino, _exit);
_next:
code = tsdbIterMergerNext(committer->tombIterMerger); code = tsdbIterMergerNext(committer->tombIterMerger);
TSDB_CHECK_CODE(code, lino, _exit); TSDB_CHECK_CODE(code, lino, _exit);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册