make CI pass
This commit is contained in:
parent
46995ea6b9
commit
39d4357227
|
@ -355,7 +355,9 @@ static int32_t metaGenerateNewMeta(SMeta **ppMeta) {
|
||||||
return code;
|
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);
|
metaClose(&pNewMeta);
|
||||||
metaInfo("vgId:%d finish to generate new meta", TD_VID(pVnode));
|
metaInfo("vgId:%d finish to generate new meta", TD_VID(pVnode));
|
||||||
return 0;
|
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);
|
snprintf(backupMetaPath, sizeof(backupMetaPath) - 1, "%s%s%s", path, TD_DIRSEP, VNODE_META_BACKUP_DIR);
|
||||||
|
|
||||||
metaClose(ppMeta);
|
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
|
// 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);
|
code = metaOpenImpl(pVnode, ppMeta, VNODE_META_DIR, false);
|
||||||
if (code) {
|
if (code) {
|
||||||
metaError("vgId:%d failed to open new meta, reason:%s", TD_VID(pVnode), tstrerror(code));
|
metaError("vgId:%d failed to open new meta, reason:%s", TD_VID(pVnode), tstrerror(code));
|
||||||
|
|
Loading…
Reference in New Issue