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

Former-commit-id: f9d38e6093357bfbb650487ca868b948f15b5656
This commit is contained in:
Yu Kun 2019-10-14 17:07:10 +08:00
parent 48d664ecb3
commit 31de75cd7f

View File

@ -110,6 +110,7 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource,
bool moved = false;
// to support test task, REFACTOR
if (resource->type() == ResourceType::CPU) {
if (auto index_engine = search_task->index_engine_) {
auto location = index_engine->GetLocation();
@ -123,6 +124,7 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource,
}
}
}
}
if (not moved) {
PushTaskToNeighbourRandomly(task, resource);