From 4cff638c30aaca525c3de497cebd228aecb410fa Mon Sep 17 00:00:00 2001 From: "yudong.cai" Date: Sun, 21 Jul 2019 11:57:12 +0800 Subject: [PATCH] 1. fix bzip2 download url 2. update exception Former-commit-id: f9f9c4e49933f3e60c7245a886882ca187722cc7 --- cpp/cmake/ThirdPartyPackages.cmake | 2 +- cpp/unittest/server/cache_test.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cpp/cmake/ThirdPartyPackages.cmake b/cpp/cmake/ThirdPartyPackages.cmake index 8b888519f9..5b5d72f885 100644 --- a/cpp/cmake/ThirdPartyPackages.cmake +++ b/cpp/cmake/ThirdPartyPackages.cmake @@ -230,7 +230,7 @@ endif() if(DEFINED ENV{MILVUS_BZIP2_URL}) set(BZIP2_SOURCE_URL "$ENV{MILVUS_BZIP2_URL}") else() - set(BZIP2_SOURCE_URL "https://fossies.org/linux/misc/bzip2-${BZIP2_VERSION}.tar.gz") + set(BZIP2_SOURCE_URL "https://sourceware.org/pub/bzip2/bzip2-${BZIP2_VERSION}.tar.gz") endif() if(DEFINED ENV{MILVUS_EASYLOGGINGPP_URL}) diff --git a/cpp/unittest/server/cache_test.cpp b/cpp/unittest/server/cache_test.cpp index 9424563cad..d45deb7475 100644 --- a/cpp/unittest/server/cache_test.cpp +++ b/cpp/unittest/server/cache_test.cpp @@ -7,6 +7,7 @@ #include "cache/CpuCacheMgr.h" #include "cache/GpuCacheMgr.h" +#include "utils/Error.h" #include "wrapper/Index.h" #include "wrapper/knowhere/vec_index.h" @@ -29,7 +30,7 @@ public: class MockVecIndex : public engine::VecIndex { public: - virtual void BuildAll(const long &nb, + virtual server::KnowhereError BuildAll(const long &nb, const float *xb, const long *ids, const engine::Config &cfg, @@ -42,14 +43,14 @@ public: return engine::IndexType::INVALID; } - virtual void Add(const long &nb, + virtual server::KnowhereError Add(const long &nb, const float *xb, const long *ids, const engine::Config &cfg = engine::Config()) { } - virtual void Search(const long &nq, + virtual server::KnowhereError Search(const long &nq, const float *xq, float *dist, long *ids, @@ -70,7 +71,7 @@ public: return binset; } - virtual void Load(const zilliz::knowhere::BinarySet &index_binary) { + virtual server::KnowhereError Load(const zilliz::knowhere::BinarySet &index_binary) { }