Merge pull request #25703 from taosdata/fix/TD-29912

fix: handle memleak in vnodeSnapWriterOpen, add log for abort_edit
This commit is contained in:
Hongze Cheng 2024-05-10 15:29:44 +08:00 committed by GitHub
commit 4d4fa9ea94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -327,6 +327,7 @@ static int32_t abort_edit(STFileSystem *fs) {
} else if (fs->etype == TSDB_FEDIT_MERGE) {
current_fname(fs->tsdb, fname, TSDB_FCURRENT_M);
} else {
tsdbError("vgId:%d %s failed since invalid etype:%d", TD_VID(fs->tsdb->pVnode), __func__, fs->etype);
ASSERT(0);
}

View File

@ -666,6 +666,7 @@ int32_t vnodeSnapWriterOpen(SVnode *pVnode, SSnapshotParam *pParam, SVSnapWriter
_err:
vError("vgId:%d, vnode snapshot writer open failed since %s", TD_VID(pVnode), tstrerror(code));
if (pWriter) taosMemoryFreeClear(pWriter);
*ppWriter = NULL;
return code;
}