diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f399b87f64610a0f7fa6b652ac4ece9605fd60f..e2ed8f4b7f2d134dc7df9dbedee0fce100b4d8bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Please mark all change in change log and use the ticket from JIRA. - \#122 - Add unique id for Job - \#130 - Set task state MOVED after resource copy it completed - \#149 - Improve large query optimizer pass +- \#156 - Not return error when search_resources and index_build_device set cpu ## Task diff --git a/core/src/server/Config.cpp b/core/src/server/Config.cpp index 86caf6dd3702346d48681a4837d984dec7861054..2a041284113632fc348685f476220d0d18a516da 100644 --- a/core/src/server/Config.cpp +++ b/core/src/server/Config.cpp @@ -714,9 +714,12 @@ Config::CheckResourceConfigSearchResources(const std::vector& value return Status(SERVER_INVALID_ARGUMENT, msg); } - for (auto& gpu_device : value) { - if (!CheckGpuDevice(gpu_device).ok()) { - std::string msg = "Invalid search resource: " + gpu_device + + for (auto& device : value) { + if (device == "cpu") { + continue; + } + if (!CheckGpuDevice(device).ok()) { + std::string msg = "Invalid search resource: " + device + ". Possible reason: resource_config.search_resources does not match your hardware."; return Status(SERVER_INVALID_ARGUMENT, msg); } @@ -726,6 +729,9 @@ Config::CheckResourceConfigSearchResources(const std::vector& value Status Config::CheckResourceConfigIndexBuildDevice(const std::string& value) { + if (value == "cpu") { + return Status::OK(); + } if (!CheckGpuDevice(value).ok()) { std::string msg = "Invalid index build device: " + value + ". Possible reason: resource_config.index_build_device does not match your hardware.";