提交 a63c8014 编写于 作者: Y Yu Kun

MS-644 - Search crashed with index-type: flat


Former-commit-id: 860b63b1ca210559d9667a7dcb483fefd3abd206
上级 bcc063cc
...@@ -110,16 +110,18 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource, ...@@ -110,16 +110,18 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource,
bool moved = false; bool moved = false;
// to support test task, REFACTOR // to support test task, REFACTOR
if (auto index_engine = search_task->index_engine_) { if (resource->type() == ResourceType::CPU) {
auto location = index_engine->GetLocation(); if (auto index_engine = search_task->index_engine_) {
auto location = index_engine->GetLocation();
for (auto i = 0; i < res_mgr.lock()->GetNumGpuResource(); ++i) {
auto index = milvus::cache::GpuCacheMgr::GetInstance(i)->GetIndex(location); for (auto i = 0; i < res_mgr.lock()->GetNumGpuResource(); ++i) {
if (index != nullptr) { auto index = milvus::cache::GpuCacheMgr::GetInstance(i)->GetIndex(location);
moved = true; if (index != nullptr) {
auto dest_resource = res_mgr.lock()->GetResource(ResourceType::GPU, i); moved = true;
PushTaskToResource(event->task_table_item_->task, dest_resource); auto dest_resource = res_mgr.lock()->GetResource(ResourceType::GPU, i);
break; PushTaskToResource(event->task_table_item_->task, dest_resource);
break;
}
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册