mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-02 17:05:33 +08:00
Merge branch 'mem-0.3.1' into 'branch-0.3.1'
MS-190: use env variable to switch mem manager and fix cmake See merge request megasearch/milvus!175 Former-commit-id: 26d63603dd11728d3d3507eb9d12ddf0b88bf28c
This commit is contained in:
commit
4fe9622be9
2
cpp/.gitignore
vendored
2
cpp/.gitignore
vendored
@ -7,4 +7,4 @@ lcov_out/
|
||||
base.info
|
||||
output.info
|
||||
output_new.info
|
||||
server.info
|
||||
server.info
|
||||
|
||||
@ -11,6 +11,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
- MS-149 - Fixed searching only one index file issue in distributed mode
|
||||
- MS-153 - fix c_str error when connecting to MySQL
|
||||
- MS-157 - fix changelog
|
||||
- MS-190 - use env variable to switch mem manager and fix cmake
|
||||
|
||||
## Improvement
|
||||
- MS-156 - Add unittest for merge result functions
|
||||
|
||||
@ -664,7 +664,8 @@ macro(build_knowhere)
|
||||
${EP_COMMON_CMAKE_ARGS}
|
||||
"-DCMAKE_INSTALL_PREFIX=${KNOWHERE_PREFIX}"
|
||||
-DCMAKE_INSTALL_LIBDIR=lib
|
||||
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
|
||||
"-DCMAKE_CUDA_COMPILER=${CMAKE_CUDA_COMPILER}"
|
||||
"-DCUDA_TOOLKIT_ROOT_DIR=${CUDA_TOOLKIT_ROOT_DIR}"
|
||||
-DCMAKE_BUILD_TYPE=Release)
|
||||
|
||||
externalproject_add(knowhere_ep
|
||||
|
||||
@ -209,6 +209,7 @@ install(TARGETS milvus_server DESTINATION bin)
|
||||
|
||||
install(FILES
|
||||
${CMAKE_BINARY_DIR}/knowhere_ep-prefix/src/knowhere_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}tbb${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
${CMAKE_BINARY_DIR}/knowhere_ep-prefix/src/knowhere_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}tbb${CMAKE_SHARED_LIBRARY_SUFFIX}.2
|
||||
${CMAKE_BINARY_DIR}/mysqlpp_ep-prefix/src/mysqlpp_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}mysqlpp${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
${CMAKE_BINARY_DIR}/mysqlpp_ep-prefix/src/mysqlpp_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}mysqlpp${CMAKE_SHARED_LIBRARY_SUFFIX}.3
|
||||
${CMAKE_BINARY_DIR}/mysqlpp_ep-prefix/src/mysqlpp_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}mysqlpp${CMAKE_SHARED_LIBRARY_SUFFIX}.3.2.4
|
||||
|
||||
@ -3,12 +3,14 @@
|
||||
// Unauthorized copying of this file, via any medium is strictly prohibited.
|
||||
// Proprietary and confidential.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "Factories.h"
|
||||
#include "DBImpl.h"
|
||||
#include "MemManager.h"
|
||||
#include "NewMemManager.h"
|
||||
#include "Exception.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
@ -16,7 +18,9 @@
|
||||
#include <assert.h>
|
||||
#include <easylogging++.h>
|
||||
#include <regex>
|
||||
#include "Exception.h"
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
namespace zilliz {
|
||||
namespace milvus {
|
||||
@ -101,11 +105,17 @@ DB* DBFactory::Build(const Options& options) {
|
||||
|
||||
MemManagerAbstractPtr MemManagerFactory::Build(const std::shared_ptr<meta::Meta>& meta,
|
||||
const Options& options) {
|
||||
#ifdef USE_NEW_MEM_MANAGER
|
||||
if (const char* env = getenv("MILVUS_USE_OLD_MEM_MANAGER")) {
|
||||
std::string env_str = env;
|
||||
std::transform(env_str.begin(), env_str.end(), env_str.begin(), ::toupper);
|
||||
if (env_str == "ON") {
|
||||
return std::make_shared<MemManager>(meta, options);
|
||||
}
|
||||
else {
|
||||
return std::make_shared<NewMemManager>(meta, options);
|
||||
}
|
||||
}
|
||||
return std::make_shared<NewMemManager>(meta, options);
|
||||
#else
|
||||
return std::make_shared<MemManager>(meta, options);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace engine
|
||||
|
||||
2
cpp/thirdparty/knowhere
vendored
2
cpp/thirdparty/knowhere
vendored
@ -1 +1 @@
|
||||
Subproject commit 3a052d063ff9b360529a4a120f9703f00c603437
|
||||
Subproject commit c3123501d62f69f9eacaa73ee96c0daeb24620a5
|
||||
@ -39,7 +39,7 @@ set(db_test_src
|
||||
cuda_add_executable(db_test ${db_test_src})
|
||||
|
||||
set(db_libs
|
||||
sqlite3
|
||||
sqlite
|
||||
boost_system
|
||||
boost_filesystem
|
||||
lz4
|
||||
|
||||
@ -77,7 +77,7 @@ target_link_libraries(metrics_test
|
||||
${knowhere_libs}
|
||||
cudart
|
||||
cublas
|
||||
sqlite3
|
||||
sqlite
|
||||
boost_system
|
||||
boost_filesystem
|
||||
lz4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user