fix: ignore errno ENOENT when copy dump config file

This commit is contained in:
obdev 2023-03-03 08:43:32 +00:00 committed by ob-robot
parent b2cc97f559
commit 1803d16852

View File

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