提交 38189735 编写于 作者: J JinHai-CN

Merge remote-tracking branch 'main/0.5.1' into 0.5.1


Former-commit-id: cd87e6722022cbcabefeba874992a1f1f148664b
...@@ -23,6 +23,7 @@ Please mark all change in change log and use the ticket from JIRA. ...@@ -23,6 +23,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#122 - Add unique id for Job - \#122 - Add unique id for Job
- \#130 - Set task state MOVED after resource copy it completed - \#130 - Set task state MOVED after resource copy it completed
- \#149 - Improve large query optimizer pass - \#149 - Improve large query optimizer pass
- \#156 - Not return error when search_resources and index_build_device set cpu
## Task ## Task
......
...@@ -714,9 +714,12 @@ Config::CheckResourceConfigSearchResources(const std::vector<std::string>& value ...@@ -714,9 +714,12 @@ Config::CheckResourceConfigSearchResources(const std::vector<std::string>& value
return Status(SERVER_INVALID_ARGUMENT, msg); return Status(SERVER_INVALID_ARGUMENT, msg);
} }
for (auto& gpu_device : value) { for (auto& device : value) {
if (!CheckGpuDevice(gpu_device).ok()) { if (device == "cpu") {
std::string msg = "Invalid search resource: " + gpu_device + continue;
}
if (!CheckGpuDevice(device).ok()) {
std::string msg = "Invalid search resource: " + device +
". Possible reason: resource_config.search_resources does not match your hardware."; ". Possible reason: resource_config.search_resources does not match your hardware.";
return Status(SERVER_INVALID_ARGUMENT, msg); return Status(SERVER_INVALID_ARGUMENT, msg);
} }
...@@ -726,6 +729,9 @@ Config::CheckResourceConfigSearchResources(const std::vector<std::string>& value ...@@ -726,6 +729,9 @@ Config::CheckResourceConfigSearchResources(const std::vector<std::string>& value
Status Status
Config::CheckResourceConfigIndexBuildDevice(const std::string& value) { Config::CheckResourceConfigIndexBuildDevice(const std::string& value) {
if (value == "cpu") {
return Status::OK();
}
if (!CheckGpuDevice(value).ok()) { if (!CheckGpuDevice(value).ok()) {
std::string msg = "Invalid index build device: " + value + std::string msg = "Invalid index build device: " + value +
". Possible reason: resource_config.index_build_device does not match your hardware."; ". Possible reason: resource_config.index_build_device does not match your hardware.";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册