make CI pass

This commit is contained in:
Hongze Cheng 2024-10-16 15:27:25 +08:00
parent 46995ea6b9
commit 39d4357227
1 changed files with 11 additions and 3 deletions

View File

@ -355,7 +355,9 @@ static int32_t metaGenerateNewMeta(SMeta **ppMeta) {
return code;
}
metaBegin(pNewMeta, META_BEGIN_HEAP_NIL);
if (metaBegin(pNewMeta, META_BEGIN_HEAP_NIL) != 0) {
metaError("vgId:%d failed to begin new meta", TD_VID(pVnode));
}
metaClose(&pNewMeta);
metaInfo("vgId:%d finish to generate new meta", TD_VID(pVnode));
return 0;
@ -385,10 +387,16 @@ int32_t metaOpen(SVnode *pVnode, SMeta **ppMeta, int8_t rollback) {
snprintf(backupMetaPath, sizeof(backupMetaPath) - 1, "%s%s%s", path, TD_DIRSEP, VNODE_META_BACKUP_DIR);
metaClose(ppMeta);
taosRenameFile(oldMetaPath, backupMetaPath);
if (taosRenameFile(oldMetaPath, backupMetaPath) != 0) {
metaError("vgId:%d failed to rename old meta to backup, reason:%s", TD_VID(pVnode), tstrerror(terrno));
return terrno;
}
// rename the new meta to old meta
taosRenameFile(newMetaPath, oldMetaPath);
if (taosRenameFile(newMetaPath, oldMetaPath) != 0) {
metaError("vgId:%d failed to rename new meta to old meta, reason:%s", TD_VID(pVnode), tstrerror(terrno));
return terrno;
}
code = metaOpenImpl(pVnode, ppMeta, VNODE_META_DIR, false);
if (code) {
metaError("vgId:%d failed to open new meta, reason:%s", TD_VID(pVnode), tstrerror(code));