fix: ignore errno ENOENT when copy dump config file
This commit is contained in:
@ -268,7 +268,7 @@ int ObConfigManager::dump2file(const char* path) const
|
|||||||
LOG_WARN("fail to backup history config file", KERRMSG, K(ret));
|
LOG_WARN("fail to backup history config file", KERRMSG, K(ret));
|
||||||
}
|
}
|
||||||
// 运行到这里的时候可能掉电,导致没有 conf 文件,需要 DBA 手工拷贝 tmp 文件到这里
|
// 运行到这里的时候可能掉电,导致没有 conf 文件,需要 DBA 手工拷贝 tmp 文件到这里
|
||||||
if (0 != ::rename(tmp_path, path)) {
|
if (0 != ::rename(tmp_path, path) && errno != ENOENT) {
|
||||||
ret = OB_ERR_SYS;
|
ret = OB_ERR_SYS;
|
||||||
LOG_WARN("fail to move tmp config file", KERRMSG, K(ret));
|
LOG_WARN("fail to move tmp config file", KERRMSG, K(ret));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user