diff --git a/core/src/db/meta/SqliteMetaImpl.cpp b/core/src/db/meta/SqliteMetaImpl.cpp index 9fb0120ddd..3fed2a81d4 100644 --- a/core/src/db/meta/SqliteMetaImpl.cpp +++ b/core/src/db/meta/SqliteMetaImpl.cpp @@ -751,7 +751,7 @@ SqliteMetaImpl::FilesToSearch(const std::string &table_id, auto match_date = in(&TableFileSchema::date_, batch_dates); auto filter = where(match_tableid and match_date and match_type); auto batch_selected = ConnectorPtr->select(select_columns, filter); - for (auto &file : selected) { + for (auto &file : batch_selected) { selected.push_back(file); } } @@ -765,7 +765,7 @@ SqliteMetaImpl::FilesToSearch(const std::string &table_id, auto match_date = in(&TableFileSchema::date_, batch_dates); auto filter = where(match_tableid and match_fileid and match_date and match_type); auto batch_selected = ConnectorPtr->select(select_columns, filter); - for (auto &file : selected) { + for (auto &file : batch_selected) { selected.push_back(file); } } diff --git a/core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp b/core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp index 45ef51c62a..e44d049a1a 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp +++ b/core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp @@ -79,12 +79,8 @@ IVFSQHybrid::CopyGpuToCpu(const Config& config) { VectorIndexPtr IVFSQHybrid::CopyCpuToGpu(const int64_t& device_id, const Config& config) { - if (auto res = FaissGpuResourceMgr::GetInstance().GetRes(device_id)) { - auto p = CopyCpuToGpuWithQuantizer(device_id, config); - return p.first; - } else { - KNOWHERE_THROW_MSG("CopyCpuToGpu Error, can't get gpu_resource"); - } + auto p = CopyCpuToGpuWithQuantizer(device_id, config); + return p.first; } void