Merge pull request #23507 from taosdata/fix/core_fix

fix: possible coredump
This commit is contained in:
Hongze Cheng 2023-11-01 22:21:21 -05:00 committed by GitHub
commit 609c2bccf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -483,11 +483,12 @@ _exit:
}
static int32_t tsdbDoMerge(SMerger *merger) {
int32_t code = 0;
int32_t lino = 0;
SSttLvl *lvl = TARRAY2_FIRST(merger->fset->lvlArr);
int32_t code = 0;
int32_t lino = 0;
if (TARRAY2_SIZE(merger->fset->lvlArr) == 0) return 0;
SSttLvl *lvl = TARRAY2_FIRST(merger->fset->lvlArr);
if (lvl->level != 0 || TARRAY2_SIZE(lvl->fobjArr) < merger->sttTrigger) return 0;
code = tsdbMergerOpen(merger);