Commit aa5eea39 authored by Jin Hai's avatar Jin Hai Committed by GitHub
Browse files

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

#169 - IVF_FLAT search out of memory

Former-commit-id: e54488d2d4c8a2840636ffe4a9daba2d82dd77c9
parents 3bf12c0d e2e189bf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ Please mark all change in change log and use the ticket from JIRA.
## Bug
- \#134 - JFrog cache error
- \#161 - Search IVFSQHybrid crash on gpu
- \#169 - IVF_FLAT search out of memory

## Feature
- \#90 - The server start error messages could be improved to enhance user experience
+6 −23
Original line number Diff line number Diff line
@@ -309,17 +309,6 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) {
        return Status::OK();
    }
#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 {
        index_ = index_->CopyToGpu(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();
        return Status(DB_ERROR, e.what());
    }
    }

    if (!already_in_cache) {
        GpuCache(device_id);
    }

    return Status::OK();
}