未验证 提交 b33bb843 编写于 作者: W wade zhang 提交者: GitHub

Merge pull request #22527 from taosdata/fix/TD-25902

fix: alter stt_trigger bug
...@@ -235,36 +235,33 @@ static int32_t tsdbCommitOpenReader(SCommitter2 *committer) { ...@@ -235,36 +235,33 @@ static int32_t tsdbCommitOpenReader(SCommitter2 *committer) {
return 0; return 0;
} }
ASSERT(TARRAY2_SIZE(committer->ctx->fset->lvlArr) == 1); SSttLvl *lvl;
TARRAY2_FOREACH(committer->ctx->fset->lvlArr, lvl) {
SSttLvl *lvl = TARRAY2_FIRST(committer->ctx->fset->lvlArr); STFileObj *fobj = NULL;
TARRAY2_FOREACH(lvl->fobjArr, fobj) {
ASSERT(lvl->level == 0); SSttFileReader *sttReader;
STFileObj *fobj = NULL; SSttFileReaderConfig config = {
TARRAY2_FOREACH(lvl->fobjArr, fobj) { .tsdb = committer->tsdb,
SSttFileReader *sttReader; .szPage = committer->szPage,
.file = fobj->f[0],
SSttFileReaderConfig config = { };
.tsdb = committer->tsdb,
.szPage = committer->szPage, code = tsdbSttFileReaderOpen(fobj->fname, &config, &sttReader);
.file = fobj->f[0], TSDB_CHECK_CODE(code, lino, _exit);
};
code = tsdbSttFileReaderOpen(fobj->fname, &config, &sttReader);
TSDB_CHECK_CODE(code, lino, _exit);
code = TARRAY2_APPEND(committer->sttReaderArray, sttReader); code = TARRAY2_APPEND(committer->sttReaderArray, sttReader);
TSDB_CHECK_CODE(code, lino, _exit); TSDB_CHECK_CODE(code, lino, _exit);
STFileOp op = { STFileOp op = {
.optype = TSDB_FOP_REMOVE, .optype = TSDB_FOP_REMOVE,
.fid = fobj->f->fid, .fid = fobj->f->fid,
.of = fobj->f[0], .of = fobj->f[0],
}; };
code = TARRAY2_APPEND(committer->fopArray, op); code = TARRAY2_APPEND(committer->fopArray, op);
TSDB_CHECK_CODE(code, lino, _exit); TSDB_CHECK_CODE(code, lino, _exit);
}
} }
_exit: _exit:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册