mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 21:39:19 +08:00
MS-644 - Search crashed with index-type: flat
Former-commit-id: f9d38e6093357bfbb650487ca868b948f15b5656
This commit is contained in:
parent
48d664ecb3
commit
31de75cd7f
@ -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) {
|
for (auto i = 0; i < res_mgr.lock()->GetNumGpuResource(); ++i) {
|
||||||
auto index = milvus::cache::GpuCacheMgr::GetInstance(i)->GetIndex(location);
|
auto index = milvus::cache::GpuCacheMgr::GetInstance(i)->GetIndex(location);
|
||||||
if (index != nullptr) {
|
if (index != nullptr) {
|
||||||
moved = true;
|
moved = true;
|
||||||
auto dest_resource = res_mgr.lock()->GetResource(ResourceType::GPU, i);
|
auto dest_resource = res_mgr.lock()->GetResource(ResourceType::GPU, i);
|
||||||
PushTaskToResource(event->task_table_item_->task, dest_resource);
|
PushTaskToResource(event->task_table_item_->task, dest_resource);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user