mirror of https://github.com/milvus-io/milvus.git
Signed-off-by: Yhz <yinghao.zou@zilliz.com>pull/2208/head
parent
14b3e95960
commit
b458034ad5
|
@ -14,6 +14,7 @@ Please mark all change in change log and use the issue from GitHub
|
||||||
- \#2128 Check has_partition params
|
- \#2128 Check has_partition params
|
||||||
- \#2131 Distance/ID returned is not correct if searching with duplicate ids
|
- \#2131 Distance/ID returned is not correct if searching with duplicate ids
|
||||||
- \#2141 Fix server start failed if wal directory exist
|
- \#2141 Fix server start failed if wal directory exist
|
||||||
|
- \#2196 Fix server start failed if wal is disabled
|
||||||
|
|
||||||
## Feature
|
## Feature
|
||||||
- \#1751 Add api SearchByID
|
- \#1751 Add api SearchByID
|
||||||
|
|
|
@ -84,19 +84,27 @@ StorageChecker::CheckStoragePermission() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check wal directory write permission */
|
/* Check wal directory write permission */
|
||||||
std::string wal_path;
|
bool wal_enable = false;
|
||||||
status = config.GetWalConfigWalPath(wal_path);
|
status = config.GetWalConfigEnable(wal_enable);
|
||||||
if (!status.ok()) {
|
if (!status.ok()) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
ret = access(wal_path.c_str(), F_OK | R_OK | W_OK);
|
|
||||||
fiu_do_on("StorageChecker.CheckStoragePermission.wal_path_access_fail", ret = -1);
|
if (wal_enable) {
|
||||||
if (0 != ret) {
|
std::string wal_path;
|
||||||
std::string err_msg = " Access WAL storage path " + wal_path + " fail. " + strerror(errno) +
|
status = config.GetWalConfigWalPath(wal_path);
|
||||||
"(code: " + std::to_string(errno) + ")";
|
if (!status.ok()) {
|
||||||
LOG_SERVER_FATAL_ << err_msg;
|
return status;
|
||||||
std::cerr << err_msg << std::endl;
|
}
|
||||||
return Status(SERVER_UNEXPECTED_ERROR, err_msg);
|
ret = access(wal_path.c_str(), F_OK | R_OK | W_OK);
|
||||||
|
fiu_do_on("StorageChecker.CheckStoragePermission.wal_path_access_fail", ret = -1);
|
||||||
|
if (0 != ret) {
|
||||||
|
std::string err_msg = " Access WAL storage path " + wal_path + " fail. " + strerror(errno) +
|
||||||
|
"(code: " + std::to_string(errno) + ")";
|
||||||
|
LOG_SERVER_FATAL_ << err_msg;
|
||||||
|
std::cerr << err_msg << std::endl;
|
||||||
|
return Status(SERVER_UNEXPECTED_ERROR, err_msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status::OK();
|
return Status::OK();
|
||||||
|
|
Loading…
Reference in New Issue