Merge pull request #171 from fishpenguin/branch-0.5.1-yk

#169 - IVF_FLAT search out of memory

Former-commit-id: 62ad8c37c2211121837b0e99a4d5b6600fb41bc9
This commit is contained in:
Jin Hai 2019-11-02 21:38:34 +08:00 committed by GitHub
commit a04adb3d7a
2 changed files with 7 additions and 23 deletions

View File

@ -7,6 +7,7 @@ Please mark all change in change log and use the ticket from JIRA.
## Bug ## Bug
- \#134 - JFrog cache error - \#134 - JFrog cache error
- \#161 - Search IVFSQHybrid crash on gpu - \#161 - Search IVFSQHybrid crash on gpu
- \#169 - IVF_FLAT search out of memory
## Feature ## Feature
- \#90 - The server start error messages could be improved to enhance user experience - \#90 - The server start error messages could be improved to enhance user experience

View File

@ -309,17 +309,6 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) {
return Status::OK(); return Status::OK();
} }
#endif #endif
auto index = std::static_pointer_cast<VecIndex>(cache::GpuCacheMgr::GetInstance(device_id)->GetIndex(location_));
bool already_in_cache = (index != nullptr);
if (already_in_cache) {
index_ = index;
} else {
if (index_ == nullptr) {
ENGINE_LOG_ERROR << "ExecutionEngineImpl: index is null, failed to copy to gpu";
return Status(DB_ERROR, "index is null");
}
try { try {
index_ = index_->CopyToGpu(device_id); index_ = index_->CopyToGpu(device_id);
ENGINE_LOG_DEBUG << "CPU to GPU" << device_id; ENGINE_LOG_DEBUG << "CPU to GPU" << device_id;
@ -327,12 +316,6 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) {
ENGINE_LOG_ERROR << e.what(); ENGINE_LOG_ERROR << e.what();
return Status(DB_ERROR, e.what()); return Status(DB_ERROR, e.what());
} }
}
if (!already_in_cache) {
GpuCache(device_id);
}
return Status::OK(); return Status::OK();
} }