From c604eb59a2480599df4ee6c15ab852350c31e7b3 Mon Sep 17 00:00:00 2001 From: groot Date: Thu, 13 Jun 2019 10:05:08 +0800 Subject: [PATCH 1/6] fix pipeline crash bug Former-commit-id: 55fbac7f92ba19ccb23425f8720b29efd65c5728 --- cpp/src/db/scheduler/SearchTaskQueue.cpp | 35 ++++++++++++------------ 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/cpp/src/db/scheduler/SearchTaskQueue.cpp b/cpp/src/db/scheduler/SearchTaskQueue.cpp index 9cf3199001..101dc818c2 100644 --- a/cpp/src/db/scheduler/SearchTaskQueue.cpp +++ b/cpp/src/db/scheduler/SearchTaskQueue.cpp @@ -21,7 +21,7 @@ void ClusterResult(const std::vector &output_ids, for (auto i = 0; i < nq; i++) { SearchContext::Id2ScoreMap id_score; for (auto k = 0; k < topk; k++) { - uint64_t index = i * nq + k; + uint64_t index = i * topk + k; id_score.push_back(std::make_pair(output_ids[index], output_distence[index])); } result_set.emplace_back(id_score); @@ -125,28 +125,29 @@ bool SearchTask::DoSearch() { try { index_engine_->Search(context->nq(), context->vectors(), inner_k, output_distence.data(), output_ids.data()); + + rc.Record("do search"); + + //step 3: cluster result + SearchContext::ResultSet result_set; + ClusterResult(output_ids, output_distence, context->nq(), inner_k, result_set); + rc.Record("cluster result"); + + //step 4: pick up topk result + TopkResult(result_set, inner_k, context->GetResult()); + rc.Record("reduce topk"); + + //step 5: calculate score between 0 ~ 100 + CalcScore(context->nq(), context->vectors(), index_engine_->Dimension(), context->GetResult(), result_set); + context->GetResult().swap(result_set); + rc.Record("calculate score"); + } catch (std::exception& ex) { SERVER_LOG_ERROR << "SearchTask encounter exception: " << ex.what(); context->IndexSearchDone(index_id_);//mark as done avoid dead lock, even search failed continue; } - rc.Record("do search"); - - //step 3: cluster result - SearchContext::ResultSet result_set; - ClusterResult(output_ids, output_distence, context->nq(), inner_k, result_set); - rc.Record("cluster result"); - - //step 4: pick up topk result - TopkResult(result_set, inner_k, context->GetResult()); - rc.Record("reduce topk"); - - //step 5: calculate score between 0 ~ 100 - CalcScore(context->nq(), context->vectors(), index_engine_->Dimension(), context->GetResult(), result_set); - context->GetResult().swap(result_set); - rc.Record("calculate score"); - //step 6: notify to send result to client context->IndexSearchDone(index_id_); } From ff006926666fc08db138f6e4685ac6ee1080eab9 Mon Sep 17 00:00:00 2001 From: groot Date: Thu, 13 Jun 2019 10:08:45 +0800 Subject: [PATCH 2/6] chnagelog Former-commit-id: 976eb7fe04f1e66e2501451491cc7dff052fbda7 --- cpp/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 87fd3ee2f3..4822bcb16b 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -34,6 +34,7 @@ Please mark all change in change log and use the ticket from JIRA. - MS-32 - Fix thrift error - MS-34 - Fix prometheus-cpp thirdparty - MS-67 - Fix license check bug +- MS-76 - Fix pipeline crash bug ## Improvement From 83bce35e8c24de86716754b55ccf1b5bc0afa3a5 Mon Sep 17 00:00:00 2001 From: zhiru Date: Thu, 13 Jun 2019 13:20:06 +0800 Subject: [PATCH 3/6] fix faiss ptx issue; change cuda gencode Former-commit-id: e45b7ae6b90cc3cdbf56dd30a8e9a674a03d0028 --- cpp/CHANGELOG.md | 1 + cpp/CMakeLists.txt | 27 --------------------------- cpp/cmake/DefineOptions.cmake | 4 ++-- cpp/cmake/ThirdPartyPackages.cmake | 10 +++++++++- 4 files changed, 12 insertions(+), 30 deletions(-) diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 87fd3ee2f3..bef16a212d 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -23,6 +23,7 @@ Please mark all change in change log and use the ticket from JIRA. - MS-65 - Implement GetTableRowCount interface - MS-45 - Implement DeleteTable interface - MS-75 - cmake: change faiss version to 1.5.2; add CUDA gencode +- MS-81 - fix faiss ptx issue; change cuda gencode ## Task - MS-74 - Change README.md in cpp diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 194fdf7e1e..028b602056 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -44,33 +44,6 @@ if("${MAKE}" STREQUAL "") endif() endif() -set(GCC_VERSION 5.3.0) -set(GCC_DIR "${CMAKE_CURRENT_BINARY_DIR}/gcc") -set(GCC_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/gcc/gcc_build") -set(GCC_TAR_NAME "${GCC_BUILD_DIR}/gcc-${GCC_VERSION}.tar.gz") -if (NOT EXISTS ${GCC_TAR_NAME}) - file(MAKE_DIRECTORY ${GCC_BUILD_DIR}) - file(DOWNLOAD http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-${GCC_VERSION}/${GCC_TAR_NAME} - ${GCC_TAR_NAME}) - message(STATUS "Building GCC-${GCC_VERSION} from source") - execute_process( - COMMAND - "${CMAKE_COMMAND} -E tar -xf ${GCC_TAR_NAME}" - COMMAND - "./configure --prefix=${GCC_DIR} --with-local-prefix=${GCC_DIR} - --enable-languages=cxx,fortran - --enable-checking=release - --disable-bootstrap" - COMMAND - "${MAKE} -j4" - COMMAND - "${MAKE} install" - RESULT_VARIABLE _status - #OUTPUT_QUIET - #ERROR_QUIET - WORKING_DIRECTORY ${GCC_BUILD_DIR}) -endif () - set(MEGASEARCH_VERSION_MAJOR "${megasearch_VERSION_MAJOR}") set(MEGASEARCH_VERSION_MINOR "${megasearch_VERSION_MINOR}") set(MEGASEARCH_VERSION_PATCH "${megasearch_VERSION_PATCH}") diff --git a/cpp/cmake/DefineOptions.cmake b/cpp/cmake/DefineOptions.cmake index 340e72d847..538e54fe3b 100644 --- a/cpp/cmake/DefineOptions.cmake +++ b/cpp/cmake/DefineOptions.cmake @@ -70,8 +70,8 @@ define_option(MEGASEARCH_WITH_FAISS "Build with FAISS library" ON) define_option(MEGASEARCH_WITH_FAISS_GPU_VERSION "Build with FAISS GPU version" ON) -define_option_string(MEGASEARCH_FAISS_GPU_ARCH "Specifying which GPU architectures to build against" - "-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61") +#define_option_string(MEGASEARCH_FAISS_GPU_ARCH "Specifying which GPU architectures to build against" +# "-gencode=arch=compute_35,code=compute_35 -gencode=arch=compute_52,code=compute_52 -gencode=arch=compute_60,code=compute_60 -gencode=arch=compute_61,code=compute_61") define_option(MEGASEARCH_WITH_LAPACK "Build with LAPACK library" ON) diff --git a/cpp/cmake/ThirdPartyPackages.cmake b/cpp/cmake/ThirdPartyPackages.cmake index bdb573ca7d..ca84bca7b0 100644 --- a/cpp/cmake/ThirdPartyPackages.cmake +++ b/cpp/cmake/ThirdPartyPackages.cmake @@ -686,7 +686,15 @@ macro(build_faiss) if(${MEGASEARCH_WITH_FAISS_GPU_VERSION} STREQUAL "ON") set(FAISS_CONFIGURE_ARGS ${FAISS_CONFIGURE_ARGS} "--with-cuda=${CUDA_TOOLKIT_ROOT_DIR}" - "--with-cuda-arch=${MEGASEARCH_FAISS_GPU_ARCH}") +# "with_cuda_arch=\"-gencode=arch=compute_35,code=compute_35 \\ +# -gencode=arch=compute_52,code=compute_52 \\ +# -gencode=arch=compute_60,code=compute_60 \\ +# -gencode=arch=compute_61,code=compute_61\"" + "--with-cuda-arch=\"-gencode=arch=compute_35,code=compute_35\"" + "--with-cuda-arch=\"-gencode=arch=compute_52,code=compute_52\"" + "--with-cuda-arch=\"-gencode=arch=compute_60,code=compute_60\"" + "--with-cuda-arch=\"-gencode=arch=compute_61,code=compute_61\"" + ) else() set(FAISS_CONFIGURE_ARGS ${FAISS_CONFIGURE_ARGS} --without-cuda) endif() From ebfa05d435603ec562691fd8a75a7935d85cd327 Mon Sep 17 00:00:00 2001 From: groot Date: Thu, 13 Jun 2019 15:32:02 +0800 Subject: [PATCH 4/6] fix hang issue Former-commit-id: 8e31caee7dc66dfca929f78a55786b5d0e86837d --- cpp/CHANGELOG.md | 1 + cpp/src/db/scheduler/IndexLoaderQueue.cpp | 7 +--- cpp/src/db/scheduler/IndexLoaderQueue.h | 5 +-- cpp/src/db/scheduler/SearchScheduler.cpp | 40 ++++++++++++++--------- cpp/src/db/scheduler/SearchScheduler.h | 10 ++++-- cpp/src/db/scheduler/SearchTaskQueue.cpp | 12 ------- cpp/src/db/scheduler/SearchTaskQueue.h | 16 +-------- 7 files changed, 36 insertions(+), 55 deletions(-) diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 4822bcb16b..baf1d92444 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -5,6 +5,7 @@ Please mark all change in change log and use the ticket from JIRA. # MegaSearch 0.3.0 (TBD) ## Bug +- MS-80 - Fix server hang issue ## Improvement diff --git a/cpp/src/db/scheduler/IndexLoaderQueue.cpp b/cpp/src/db/scheduler/IndexLoaderQueue.cpp index 2840e6564e..52d27831cb 100644 --- a/cpp/src/db/scheduler/IndexLoaderQueue.cpp +++ b/cpp/src/db/scheduler/IndexLoaderQueue.cpp @@ -13,12 +13,6 @@ namespace zilliz { namespace vecwise { namespace engine { -IndexLoaderQueue& -IndexLoaderQueue::GetInstance() { - static IndexLoaderQueue instance; - return instance; -} - void IndexLoaderQueue::Put(const SearchContextPtr &search_context) { std::unique_lock lock(mtx); @@ -26,6 +20,7 @@ IndexLoaderQueue::Put(const SearchContextPtr &search_context) { if(search_context == nullptr) { queue_.push_back(nullptr); + empty_.notify_all(); return; } diff --git a/cpp/src/db/scheduler/IndexLoaderQueue.h b/cpp/src/db/scheduler/IndexLoaderQueue.h index f0d71dcbd7..3850a8de8b 100644 --- a/cpp/src/db/scheduler/IndexLoaderQueue.h +++ b/cpp/src/db/scheduler/IndexLoaderQueue.h @@ -26,18 +26,15 @@ public: using IndexLoaderContextPtr = std::shared_ptr; class IndexLoaderQueue { -private: +public: IndexLoaderQueue() : mtx(), full_(), empty_() {} IndexLoaderQueue(const IndexLoaderQueue &rhs) = delete; IndexLoaderQueue &operator=(const IndexLoaderQueue &rhs) = delete; -public: using LoaderQueue = std::list; - static IndexLoaderQueue& GetInstance(); - void Put(const SearchContextPtr &search_context); IndexLoaderContextPtr Take(); diff --git a/cpp/src/db/scheduler/SearchScheduler.cpp b/cpp/src/db/scheduler/SearchScheduler.cpp index c18f95d04d..137cac30c7 100644 --- a/cpp/src/db/scheduler/SearchScheduler.cpp +++ b/cpp/src/db/scheduler/SearchScheduler.cpp @@ -55,8 +55,7 @@ void CollectDurationMetrics(int index_type, double total_time) { } SearchScheduler::SearchScheduler() - : thread_pool_(2), - stopped_(true) { + : stopped_(true) { Start(); } @@ -75,8 +74,13 @@ SearchScheduler::Start() { return true; } - thread_pool_.enqueue(&SearchScheduler::IndexLoadWorker, this); - thread_pool_.enqueue(&SearchScheduler::SearchWorker, this); + stopped_ = false; + + search_queue_.SetCapacity(2); + + index_load_thread_ = std::make_shared(&SearchScheduler::IndexLoadWorker, this); + search_thread_ = std::make_shared(&SearchScheduler::SearchWorker, this); + return true; } @@ -86,29 +90,34 @@ SearchScheduler::Stop() { return true; } - IndexLoaderQueue& index_queue = IndexLoaderQueue::GetInstance(); - index_queue.Put(nullptr); + if(index_load_thread_) { + index_load_queue_.Put(nullptr); + index_load_thread_->join(); + index_load_thread_ = nullptr; + } - SearchTaskQueue& search_queue = SearchTaskQueue::GetInstance(); - search_queue.Put(nullptr); + if(search_thread_) { + search_queue_.Put(nullptr); + search_thread_->join(); + search_thread_ = nullptr; + } + + stopped_ = true; return true; } bool SearchScheduler::ScheduleSearchTask(SearchContextPtr& search_context) { - IndexLoaderQueue& index_queue = IndexLoaderQueue::GetInstance(); - index_queue.Put(search_context); + index_load_queue_.Put(search_context); return true; } bool SearchScheduler::IndexLoadWorker() { - IndexLoaderQueue& index_queue = IndexLoaderQueue::GetInstance(); - SearchTaskQueue& search_queue = SearchTaskQueue::GetInstance(); while(true) { - IndexLoaderContextPtr context = index_queue.Take(); + IndexLoaderContextPtr context = index_load_queue_.Take(); if(context == nullptr) { SERVER_LOG_INFO << "Stop thread for index loading"; break;//exit @@ -137,7 +146,7 @@ SearchScheduler::IndexLoadWorker() { task_ptr->index_type_ = context->file_->file_type_; task_ptr->index_engine_ = index_ptr; task_ptr->search_contexts_.swap(context->search_contexts_); - search_queue.Put(task_ptr); + search_queue_.Put(task_ptr); } return true; @@ -145,9 +154,8 @@ SearchScheduler::IndexLoadWorker() { bool SearchScheduler::SearchWorker() { - SearchTaskQueue& search_queue = SearchTaskQueue::GetInstance(); while(true) { - SearchTaskPtr task_ptr = search_queue.Take(); + SearchTaskPtr task_ptr = search_queue_.Take(); if(task_ptr == nullptr) { SERVER_LOG_INFO << "Stop thread for searching"; break;//exit diff --git a/cpp/src/db/scheduler/SearchScheduler.h b/cpp/src/db/scheduler/SearchScheduler.h index 24c85395fc..6a5b7b344f 100644 --- a/cpp/src/db/scheduler/SearchScheduler.h +++ b/cpp/src/db/scheduler/SearchScheduler.h @@ -6,7 +6,8 @@ #pragma once #include "SearchContext.h" -#include "utils/ThreadPool.h" +#include "IndexLoaderQueue.h" +#include "SearchTaskQueue.h" namespace zilliz { namespace vecwise { @@ -30,7 +31,12 @@ private: bool SearchWorker(); private: - server::ThreadPool thread_pool_; + std::shared_ptr index_load_thread_; + std::shared_ptr search_thread_; + + IndexLoaderQueue index_load_queue_; + SearchTaskQueue search_queue_; + bool stopped_ = true; }; diff --git a/cpp/src/db/scheduler/SearchTaskQueue.cpp b/cpp/src/db/scheduler/SearchTaskQueue.cpp index 101dc818c2..7b18f8cb69 100644 --- a/cpp/src/db/scheduler/SearchTaskQueue.cpp +++ b/cpp/src/db/scheduler/SearchTaskQueue.cpp @@ -94,18 +94,6 @@ void CalcScore(uint64_t vector_count, } - -SearchTaskQueue::SearchTaskQueue() { - SetCapacity(4); -} - - -SearchTaskQueue& -SearchTaskQueue::GetInstance() { - static SearchTaskQueue instance; - return instance; -} - bool SearchTask::DoSearch() { if(index_engine_ == nullptr) { return false; diff --git a/cpp/src/db/scheduler/SearchTaskQueue.h b/cpp/src/db/scheduler/SearchTaskQueue.h index bd8e9d7f24..ef0f77ef9d 100644 --- a/cpp/src/db/scheduler/SearchTaskQueue.h +++ b/cpp/src/db/scheduler/SearchTaskQueue.h @@ -27,21 +27,7 @@ public: }; using SearchTaskPtr = std::shared_ptr; - -class SearchTaskQueue : public server::BlockingQueue { -private: - SearchTaskQueue(); - - SearchTaskQueue(const SearchTaskQueue &rhs) = delete; - - SearchTaskQueue &operator=(const SearchTaskQueue &rhs) = delete; - -public: - static SearchTaskQueue& GetInstance(); - -private: - -}; +using SearchTaskQueue = server::BlockingQueue; } From 94612238e5c023d955f309a5707cb618dc89b3a3 Mon Sep 17 00:00:00 2001 From: jinhai Date: Thu, 13 Jun 2019 16:02:25 +0800 Subject: [PATCH 5/6] MS-82 & MS-83 Update vecwise to Milvus Former-commit-id: 69d1f1b661e6fc7779b4ae3abae60eeb28fa2b04 --- cpp/CHANGELOG.md | 2 ++ cpp/conf/server_config.yaml | 2 +- cpp/conf/server_config_template.yaml | 2 +- cpp/conf/vecwise_engine_log.conf | 12 +++++----- cpp/scripts/stop_server.sh | 4 ++-- cpp/src/cache/Cache.cpp | 4 ++-- cpp/src/cache/Cache.h | 4 ++-- cpp/src/cache/CacheMgr.cpp | 2 +- cpp/src/cache/CacheMgr.h | 2 +- cpp/src/cache/CpuCacheMgr.cpp | 2 +- cpp/src/cache/CpuCacheMgr.h | 2 +- cpp/src/cache/DataObj.h | 2 +- cpp/src/cache/GpuCacheMgr.cpp | 2 +- cpp/src/cache/GpuCacheMgr.h | 2 +- cpp/src/cache/LRU.h | 4 ++-- cpp/src/config/ConfigNode.cpp | 2 +- cpp/src/config/ConfigNode.h | 2 +- cpp/src/config/IConfigMgr.cpp | 2 +- cpp/src/config/IConfigMgr.h | 2 +- cpp/src/config/YamlConfigMgr.cpp | 2 +- cpp/src/config/YamlConfigMgr.h | 2 +- cpp/src/db/DB.cpp | 4 ++-- cpp/src/db/DB.h | 4 ++-- cpp/src/db/DBImpl.cpp | 4 ++-- cpp/src/db/DBImpl.h | 4 ++-- cpp/src/db/DBMetaImpl.cpp | 4 ++-- cpp/src/db/DBMetaImpl.h | 4 ++-- cpp/src/db/EngineFactory.cpp | 2 +- cpp/src/db/EngineFactory.h | 2 +- cpp/src/db/Env.cpp | 4 ++-- cpp/src/db/Env.h | 4 ++-- cpp/src/db/Exception.h | 4 ++-- cpp/src/db/ExecutionEngine.cpp | 4 ++-- cpp/src/db/ExecutionEngine.h | 4 ++-- cpp/src/db/Factories.cpp | 4 ++-- cpp/src/db/Factories.h | 4 ++-- cpp/src/db/FaissExecutionEngine.cpp | 10 ++++----- cpp/src/db/FaissExecutionEngine.h | 4 ++-- cpp/src/db/IDGenerator.cpp | 4 ++-- cpp/src/db/IDGenerator.h | 4 ++-- cpp/src/db/Log.h | 2 +- cpp/src/db/MemManager.cpp | 4 ++-- cpp/src/db/MemManager.h | 4 ++-- cpp/src/db/Meta.cpp | 4 ++-- cpp/src/db/Meta.h | 4 ++-- cpp/src/db/MetaConsts.h | 4 ++-- cpp/src/db/MetaTypes.h | 4 ++-- cpp/src/db/Options.cpp | 4 ++-- cpp/src/db/Options.h | 4 ++-- cpp/src/db/Status.cpp | 4 ++-- cpp/src/db/Status.h | 4 ++-- cpp/src/db/Types.h | 4 ++-- cpp/src/db/Utils.cpp | 4 ++-- cpp/src/db/Utils.h | 4 ++-- cpp/src/db/scheduler/IScheduleStrategy.h | 2 +- cpp/src/db/scheduler/IndexLoaderQueue.cpp | 2 +- cpp/src/db/scheduler/IndexLoaderQueue.h | 2 +- cpp/src/db/scheduler/ScheduleStrategy.cpp | 4 ++-- cpp/src/db/scheduler/ScheduleStrategy.h | 2 +- cpp/src/db/scheduler/SearchContext.cpp | 2 +- cpp/src/db/scheduler/SearchContext.h | 2 +- cpp/src/db/scheduler/SearchScheduler.cpp | 2 +- cpp/src/db/scheduler/SearchScheduler.h | 2 +- cpp/src/db/scheduler/SearchTaskQueue.cpp | 2 +- cpp/src/db/scheduler/SearchTaskQueue.h | 2 +- cpp/src/license/GetSysInfo.cpp | 2 +- cpp/src/license/LicenseCheck.cpp | 2 +- cpp/src/license/LicenseCheck.h | 2 +- cpp/src/license/LicenseGenerator.cpp | 2 +- cpp/src/license/LicenseLibrary.cpp | 2 +- cpp/src/license/LicenseLibrary.h | 2 +- cpp/src/main.cpp | 10 ++++----- cpp/src/metrics/MetricBase.h | 2 +- cpp/src/metrics/Metrics.cpp | 2 +- cpp/src/metrics/Metrics.h | 2 +- cpp/src/metrics/PrometheusMetrics.cpp | 2 +- cpp/src/metrics/PrometheusMetrics.h | 2 +- cpp/src/metrics/SystemInfo.cpp | 2 +- cpp/src/metrics/SystemInfo.h | 2 +- cpp/src/server/MegasearchHandler.cpp | 2 +- cpp/src/server/MegasearchHandler.h | 2 +- cpp/src/server/MegasearchScheduler.cpp | 2 +- cpp/src/server/MegasearchScheduler.h | 2 +- cpp/src/server/MegasearchServer.cpp | 2 +- cpp/src/server/MegasearchServer.h | 2 +- cpp/src/server/MegasearchTask.cpp | 16 +++++++------- cpp/src/server/MegasearchTask.h | 2 +- cpp/src/server/MegasearchThreadPoolServer.cpp | 4 ++-- cpp/src/server/MegasearchThreadPoolServer.h | 2 +- cpp/src/server/Server.cpp | 15 +++++-------- cpp/src/server/Server.h | 2 +- cpp/src/server/ServerConfig.cpp | 2 +- cpp/src/server/ServerConfig.h | 2 +- cpp/src/utils/AttributeSerializer.cpp | 2 +- cpp/src/utils/AttributeSerializer.h | 2 +- cpp/src/utils/BlockingQueue.h | 2 +- cpp/src/utils/BlockingQueue.inl | 2 +- cpp/src/utils/CommonUtil.cpp | 2 +- cpp/src/utils/CommonUtil.h | 2 +- cpp/src/utils/Error.h | 4 ++-- cpp/src/utils/Log.h | 6 ++--- cpp/src/utils/LogUtil.cpp | 4 ++-- cpp/src/utils/LogUtil.h | 2 +- cpp/src/utils/SignalUtil.cpp | 5 +++-- cpp/src/utils/SignalUtil.h | 2 +- cpp/src/utils/StringHelpFunctions.cpp | 2 +- cpp/src/utils/StringHelpFunctions.h | 2 +- cpp/src/utils/ThreadPool.h | 2 +- cpp/src/utils/TimeRecorder.cpp | 2 +- cpp/src/utils/TimeRecorder.h | 2 +- cpp/src/wrapper/Index.cpp | 2 +- cpp/src/wrapper/Index.h | 2 +- cpp/src/wrapper/IndexBuilder.cpp | 6 ++--- cpp/src/wrapper/IndexBuilder.h | 2 +- cpp/src/wrapper/Operand.cpp | 2 +- cpp/src/wrapper/Operand.h | 2 +- cpp/src/wrapper/gpu/Arithmetic.h | 2 +- cpp/src/wrapper/gpu/Topk.cu | 22 +++++++++---------- cpp/src/wrapper/gpu/Topk.h | 2 +- cpp/unittest/db/db_tests.cpp | 2 +- cpp/unittest/db/meta_tests.cpp | 2 +- cpp/unittest/db/utils.cpp | 2 +- cpp/unittest/db/utils.h | 10 ++++----- cpp/unittest/faiss_wrapper/topk_test.cpp | 2 +- cpp/unittest/faiss_wrapper/wrapper_test.cpp | 2 +- cpp/unittest/license/license_check_test.cpp | 2 +- .../license/license_library_tests.cpp | 2 +- cpp/unittest/metrics/metrics_test.cpp | 6 ++--- cpp/unittest/server/cache_test.cpp | 2 +- cpp/unittest/server/common_test.cpp | 2 +- cpp/unittest/server/util_test.cpp | 2 +- cpp/unittest/vecwise_test.cpp | 4 ++-- 132 files changed, 217 insertions(+), 219 deletions(-) diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 563164d458..a8a5af195f 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -7,6 +7,8 @@ Please mark all change in change log and use the ticket from JIRA. ## Bug ## Improvement +- MS-82 - Update server startup welcome message +- MS-83 - Update vecwise to Milvus ## New Feature diff --git a/cpp/conf/server_config.yaml b/cpp/conf/server_config.yaml index 781a77dd35..64bea0121c 100644 --- a/cpp/conf/server_config.yaml +++ b/cpp/conf/server_config.yaml @@ -6,7 +6,7 @@ server_config: gpu_index: 0 #which gpu to be used db_config: - db_path: /tmp/vecwise + db_path: /tmp/milvus db_backend_url: http://127.0.0.1 db_flush_interval: 5 #unit: second idmapper_max_open_file: 128 diff --git a/cpp/conf/server_config_template.yaml b/cpp/conf/server_config_template.yaml index b701956498..131fa57153 100644 --- a/cpp/conf/server_config_template.yaml +++ b/cpp/conf/server_config_template.yaml @@ -6,7 +6,7 @@ server_config: gpu_index: 0 #which gpu to be used db_config: - db_path: /tmp/vecwise + db_path: /tmp/milvus db_backend_url: http://127.0.0.1 db_flush_interval: 5 #unit: second idmapper_max_open_file: 128 diff --git a/cpp/conf/vecwise_engine_log.conf b/cpp/conf/vecwise_engine_log.conf index 4935b2fd9a..cf16da6d18 100644 --- a/cpp/conf/vecwise_engine_log.conf +++ b/cpp/conf/vecwise_engine_log.conf @@ -1,6 +1,6 @@ * GLOBAL: FORMAT = "%datetime | %level | %logger | %msg" - FILENAME = "/tmp/vecwise/logs/vecwise_engine-%datetime{%H:%m}-global.log" + FILENAME = "/tmp/milvus/logs/vecwise_engine-%datetime{%H:%m}-global.log" ENABLED = true TO_FILE = true TO_STANDARD_OUTPUT = true @@ -8,12 +8,12 @@ PERFORMANCE_TRACKING = false MAX_LOG_FILE_SIZE = 2097152 ## Throw log files away after 2MB * DEBUG: - FILENAME = "/tmp/vecwise/logs/vecwise_engine-%datetime{%H:%m}-debug.log" + FILENAME = "/tmp/milvus/logs/vecwise_engine-%datetime{%H:%m}-debug.log" ENABLED = true * WARNING: - FILENAME = "/tmp/vecwise/logs/vecwise_engine-%datetime{%H:%m}-warning.log" + FILENAME = "/tmp/milvus/logs/vecwise_engine-%datetime{%H:%m}-warning.log" * TRACE: - FILENAME = "/tmp/vecwise/logs/vecwise_engine-%datetime{%H:%m}-trace.log" + FILENAME = "/tmp/milvus/logs/vecwise_engine-%datetime{%H:%m}-trace.log" * VERBOSE: FORMAT = "%datetime{%d/%M/%y} | %level-%vlevel | %msg" TO_FILE = false @@ -21,7 +21,7 @@ ## Error logs * ERROR: ENABLED = false - FILENAME = "/tmp/vecwise/logs/vecwise_engine-%datetime{%H:%m}-error.log" + FILENAME = "/tmp/milvus/logs/vecwise_engine-%datetime{%H:%m}-error.log" * FATAL: ENABLED = false - FILENAME = "/tmp/vecwise/logs/vecwise_engine-%datetime{%H:%m}-fatal.log" \ No newline at end of file + FILENAME = "/tmp/milvus/logs/vecwise_engine-%datetime{%H:%m}-fatal.log" \ No newline at end of file diff --git a/cpp/scripts/stop_server.sh b/cpp/scripts/stop_server.sh index 89bd9398e0..6af1c47727 100755 --- a/cpp/scripts/stop_server.sh +++ b/cpp/scripts/stop_server.sh @@ -10,7 +10,7 @@ function kill_progress() STATUS=$(kill_progress "vecwise_server" ) if [[ ${STATUS} == "false" ]];then - echo "vecwise_server closed abnormally!" + echo "Milvus server closed abnormally!" else - echo "vecwise_server closed successfully!" + echo "Milvus server closed successfully!" fi diff --git a/cpp/src/cache/Cache.cpp b/cpp/src/cache/Cache.cpp index 31a499d01a..4d09acc9a5 100644 --- a/cpp/src/cache/Cache.cpp +++ b/cpp/src/cache/Cache.cpp @@ -10,7 +10,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { Cache::Cache(int64_t capacity, uint64_t cache_max_count) @@ -218,6 +218,6 @@ void Cache::print() { } } // cache -} // vecwise +} // milvus } // zilliz diff --git a/cpp/src/cache/Cache.h b/cpp/src/cache/Cache.h index a52eb0bafc..80f3d0d713 100644 --- a/cpp/src/cache/Cache.h +++ b/cpp/src/cache/Cache.h @@ -14,7 +14,7 @@ #include "DataObj.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { const std::string SWAP_DIR = ".CACHE"; @@ -65,6 +65,6 @@ private: using CachePtr = std::shared_ptr; } // cache -} // vecwise +} // milvus } // zilliz diff --git a/cpp/src/cache/CacheMgr.cpp b/cpp/src/cache/CacheMgr.cpp index 24b4bf59eb..14efb3a0bb 100644 --- a/cpp/src/cache/CacheMgr.cpp +++ b/cpp/src/cache/CacheMgr.cpp @@ -8,7 +8,7 @@ #include "metrics/Metrics.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { CacheMgr::CacheMgr() { diff --git a/cpp/src/cache/CacheMgr.h b/cpp/src/cache/CacheMgr.h index 296624b982..003c883be7 100644 --- a/cpp/src/cache/CacheMgr.h +++ b/cpp/src/cache/CacheMgr.h @@ -9,7 +9,7 @@ #include "Cache.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { class CacheMgr { diff --git a/cpp/src/cache/CpuCacheMgr.cpp b/cpp/src/cache/CpuCacheMgr.cpp index 3860016383..36da562b83 100644 --- a/cpp/src/cache/CpuCacheMgr.cpp +++ b/cpp/src/cache/CpuCacheMgr.cpp @@ -8,7 +8,7 @@ #include "server/ServerConfig.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { CpuCacheMgr::CpuCacheMgr() { diff --git a/cpp/src/cache/CpuCacheMgr.h b/cpp/src/cache/CpuCacheMgr.h index 0d4fdbb8ac..8b0f98e6b4 100644 --- a/cpp/src/cache/CpuCacheMgr.h +++ b/cpp/src/cache/CpuCacheMgr.h @@ -8,7 +8,7 @@ #include "CacheMgr.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { class CpuCacheMgr : public CacheMgr { diff --git a/cpp/src/cache/DataObj.h b/cpp/src/cache/DataObj.h index 488d8d3024..1dff04027e 100644 --- a/cpp/src/cache/DataObj.h +++ b/cpp/src/cache/DataObj.h @@ -11,7 +11,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { class DataObj { diff --git a/cpp/src/cache/GpuCacheMgr.cpp b/cpp/src/cache/GpuCacheMgr.cpp index 58c9f8070b..b3e73fdcdc 100644 --- a/cpp/src/cache/GpuCacheMgr.cpp +++ b/cpp/src/cache/GpuCacheMgr.cpp @@ -8,7 +8,7 @@ #include "server/ServerConfig.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { GpuCacheMgr::GpuCacheMgr() { diff --git a/cpp/src/cache/GpuCacheMgr.h b/cpp/src/cache/GpuCacheMgr.h index d44abc3bdb..4efec08cec 100644 --- a/cpp/src/cache/GpuCacheMgr.h +++ b/cpp/src/cache/GpuCacheMgr.h @@ -7,7 +7,7 @@ #include "CacheMgr.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { class GpuCacheMgr : public CacheMgr { diff --git a/cpp/src/cache/LRU.h b/cpp/src/cache/LRU.h index 3f5620850c..5d8e8881c9 100644 --- a/cpp/src/cache/LRU.h +++ b/cpp/src/cache/LRU.h @@ -12,7 +12,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace cache { template @@ -97,6 +97,6 @@ private: }; } // cache -} // vecwise +} // milvus } // zilliz diff --git a/cpp/src/config/ConfigNode.cpp b/cpp/src/config/ConfigNode.cpp index 752d2f9545..e17eea1daf 100644 --- a/cpp/src/config/ConfigNode.cpp +++ b/cpp/src/config/ConfigNode.cpp @@ -12,7 +12,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { void ConfigNode::Combine(const ConfigNode& target) { diff --git a/cpp/src/config/ConfigNode.h b/cpp/src/config/ConfigNode.h index a0a7d1d264..6cb3f8f808 100644 --- a/cpp/src/config/ConfigNode.h +++ b/cpp/src/config/ConfigNode.h @@ -10,7 +10,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class ConfigNode; diff --git a/cpp/src/config/IConfigMgr.cpp b/cpp/src/config/IConfigMgr.cpp index 42b01b608b..ffb45b1881 100644 --- a/cpp/src/config/IConfigMgr.cpp +++ b/cpp/src/config/IConfigMgr.cpp @@ -7,7 +7,7 @@ #include "YamlConfigMgr.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { IConfigMgr * IConfigMgr::GetInstance() { diff --git a/cpp/src/config/IConfigMgr.h b/cpp/src/config/IConfigMgr.h index 31f6ed2e96..f2232b6e49 100644 --- a/cpp/src/config/IConfigMgr.h +++ b/cpp/src/config/IConfigMgr.h @@ -9,7 +9,7 @@ #include "ConfigNode.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { // this class can parse nested config file and return config item diff --git a/cpp/src/config/YamlConfigMgr.cpp b/cpp/src/config/YamlConfigMgr.cpp index 276db4ee9e..9a34ef3e63 100644 --- a/cpp/src/config/YamlConfigMgr.cpp +++ b/cpp/src/config/YamlConfigMgr.cpp @@ -9,7 +9,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { ServerError YamlConfigMgr::LoadConfigFile(const std::string &filename) { diff --git a/cpp/src/config/YamlConfigMgr.h b/cpp/src/config/YamlConfigMgr.h index d68ec668a1..b8828b7a8c 100644 --- a/cpp/src/config/YamlConfigMgr.h +++ b/cpp/src/config/YamlConfigMgr.h @@ -12,7 +12,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class YamlConfigMgr : public IConfigMgr { diff --git a/cpp/src/db/DB.cpp b/cpp/src/db/DB.cpp index bfb83a446c..31f14a90d0 100644 --- a/cpp/src/db/DB.cpp +++ b/cpp/src/db/DB.cpp @@ -10,7 +10,7 @@ #include "Factories.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { DB::~DB() {} @@ -21,5 +21,5 @@ void DB::Open(const Options& options, DB** dbptr) { } } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/DB.h b/cpp/src/db/DB.h index 18d48dfc94..b487397f33 100644 --- a/cpp/src/db/DB.h +++ b/cpp/src/db/DB.h @@ -13,7 +13,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class Env; @@ -50,5 +50,5 @@ public: }; // DB } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index 9f04dcf7d1..b127778be8 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -20,7 +20,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace { @@ -580,5 +580,5 @@ DBImpl::~DBImpl() { } } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/DBImpl.h b/cpp/src/db/DBImpl.h index 6bf761b074..1a2f80601d 100644 --- a/cpp/src/db/DBImpl.h +++ b/cpp/src/db/DBImpl.h @@ -16,7 +16,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class Env; @@ -100,5 +100,5 @@ private: } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/DBMetaImpl.cpp b/cpp/src/db/DBMetaImpl.cpp index ed55436a75..26185b84b3 100644 --- a/cpp/src/db/DBMetaImpl.cpp +++ b/cpp/src/db/DBMetaImpl.cpp @@ -21,7 +21,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace meta { @@ -923,5 +923,5 @@ DBMetaImpl::~DBMetaImpl() { } // namespace meta } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/DBMetaImpl.h b/cpp/src/db/DBMetaImpl.h index cf6927b144..dcac77ded8 100644 --- a/cpp/src/db/DBMetaImpl.h +++ b/cpp/src/db/DBMetaImpl.h @@ -9,7 +9,7 @@ #include "Options.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace meta { @@ -76,5 +76,5 @@ private: } // namespace meta } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/EngineFactory.cpp b/cpp/src/db/EngineFactory.cpp index a9b0bc744d..26ef639c88 100644 --- a/cpp/src/db/EngineFactory.cpp +++ b/cpp/src/db/EngineFactory.cpp @@ -8,7 +8,7 @@ #include "Log.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { ExecutionEnginePtr diff --git a/cpp/src/db/EngineFactory.h b/cpp/src/db/EngineFactory.h index fe984d70cd..9d667bd5aa 100644 --- a/cpp/src/db/EngineFactory.h +++ b/cpp/src/db/EngineFactory.h @@ -9,7 +9,7 @@ #include "ExecutionEngine.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class EngineFactory { diff --git a/cpp/src/db/Env.cpp b/cpp/src/db/Env.cpp index 5c5bcdb52a..2cca7da13b 100644 --- a/cpp/src/db/Env.cpp +++ b/cpp/src/db/Env.cpp @@ -9,7 +9,7 @@ #include "Env.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { Env::Env() @@ -83,5 +83,5 @@ Env* Env::Default() { } } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Env.h b/cpp/src/db/Env.h index 28ecaaacaf..7818b25ef0 100644 --- a/cpp/src/db/Env.h +++ b/cpp/src/db/Env.h @@ -12,7 +12,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class Env { @@ -52,5 +52,5 @@ protected: }; // Env } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Exception.h b/cpp/src/db/Exception.h index a5b4b4c421..2474b70283 100644 --- a/cpp/src/db/Exception.h +++ b/cpp/src/db/Exception.h @@ -9,7 +9,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class Exception : public std::exception { @@ -50,5 +50,5 @@ public: }; } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/ExecutionEngine.cpp b/cpp/src/db/ExecutionEngine.cpp index 54349b7b69..f27d04dfa0 100644 --- a/cpp/src/db/ExecutionEngine.cpp +++ b/cpp/src/db/ExecutionEngine.cpp @@ -8,7 +8,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { Status ExecutionEngine::AddWithIds(const std::vector& vectors, const std::vector& vector_ids) { @@ -23,5 +23,5 @@ Status ExecutionEngine::AddWithIds(const std::vector& vectors, const std: } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/ExecutionEngine.h b/cpp/src/db/ExecutionEngine.h index ad4355786f..f26dce6371 100644 --- a/cpp/src/db/ExecutionEngine.h +++ b/cpp/src/db/ExecutionEngine.h @@ -11,7 +11,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { enum class EngineType { @@ -57,5 +57,5 @@ using ExecutionEnginePtr = std::shared_ptr; } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Factories.cpp b/cpp/src/db/Factories.cpp index bbaa17343b..99a2918b85 100644 --- a/cpp/src/db/Factories.cpp +++ b/cpp/src/db/Factories.cpp @@ -15,7 +15,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { DBMetaOptions DBMetaOptionsFactory::Build(const std::string& path) { @@ -54,5 +54,5 @@ DB* DBFactory::Build(const Options& options) { } } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Factories.h b/cpp/src/db/Factories.h index 9bcd3ffb67..46d3e1bbc0 100644 --- a/cpp/src/db/Factories.h +++ b/cpp/src/db/Factories.h @@ -14,7 +14,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { struct DBMetaOptionsFactory { @@ -35,5 +35,5 @@ struct DBFactory { }; } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/FaissExecutionEngine.cpp b/cpp/src/db/FaissExecutionEngine.cpp index 65bdeead1f..467ebe31e0 100644 --- a/cpp/src/db/FaissExecutionEngine.cpp +++ b/cpp/src/db/FaissExecutionEngine.cpp @@ -17,7 +17,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { @@ -68,7 +68,7 @@ Status FaissExecutionEngine::Serialize() { } Status FaissExecutionEngine::Load() { - auto index = zilliz::vecwise::cache::CpuCacheMgr::GetInstance()->GetIndex(location_); + auto index = zilliz::milvus::cache::CpuCacheMgr::GetInstance()->GetIndex(location_); bool to_cache = false; auto start_time = METRICS_NOW_TIME; if (!index) { @@ -98,7 +98,7 @@ Status FaissExecutionEngine::Merge(const std::string& location) { if (location == location_) { return Status::Error("Cannot Merge Self"); } - auto to_merge = zilliz::vecwise::cache::CpuCacheMgr::GetInstance()->GetIndex(location); + auto to_merge = zilliz::milvus::cache::CpuCacheMgr::GetInstance()->GetIndex(location); if (!to_merge) { to_merge = read_index(location); } @@ -140,7 +140,7 @@ Status FaissExecutionEngine::Search(long n, } Status FaissExecutionEngine::Cache() { - zilliz::vecwise::cache::CpuCacheMgr::GetInstance( + zilliz::milvus::cache::CpuCacheMgr::GetInstance( )->InsertItem(location_, std::make_shared(pIndex_)); return Status::OK(); @@ -148,5 +148,5 @@ Status FaissExecutionEngine::Cache() { } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/FaissExecutionEngine.h b/cpp/src/db/FaissExecutionEngine.h index e41fe06456..5667df34ea 100644 --- a/cpp/src/db/FaissExecutionEngine.h +++ b/cpp/src/db/FaissExecutionEngine.h @@ -15,7 +15,7 @@ namespace faiss { } namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { @@ -68,5 +68,5 @@ protected: } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/IDGenerator.cpp b/cpp/src/db/IDGenerator.cpp index d6e71091e6..c4f9787ba7 100644 --- a/cpp/src/db/IDGenerator.cpp +++ b/cpp/src/db/IDGenerator.cpp @@ -10,7 +10,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { IDGenerator::~IDGenerator() {} @@ -49,5 +49,5 @@ void SimpleIDGenerator::GetNextIDNumbers(size_t n, IDNumbers& ids) { } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/IDGenerator.h b/cpp/src/db/IDGenerator.h index e084e2b146..079485060c 100644 --- a/cpp/src/db/IDGenerator.h +++ b/cpp/src/db/IDGenerator.h @@ -11,7 +11,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class IDGenerator { @@ -37,5 +37,5 @@ private: } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Log.h b/cpp/src/db/Log.h index 1e938591a0..ac46a043aa 100644 --- a/cpp/src/db/Log.h +++ b/cpp/src/db/Log.h @@ -8,7 +8,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { #define ENGINE_DOMAIN_NAME "[ENGINE] " diff --git a/cpp/src/db/MemManager.cpp b/cpp/src/db/MemManager.cpp index 9bae4c9f21..c8bd5de23b 100644 --- a/cpp/src/db/MemManager.cpp +++ b/cpp/src/db/MemManager.cpp @@ -15,7 +15,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { MemVectors::MemVectors(const std::shared_ptr& meta_ptr, @@ -144,5 +144,5 @@ Status MemManager::Serialize(std::vector& table_ids) { } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/MemManager.h b/cpp/src/db/MemManager.h index 1363bf971a..395c8f48cd 100644 --- a/cpp/src/db/MemManager.h +++ b/cpp/src/db/MemManager.h @@ -17,7 +17,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace meta { @@ -92,5 +92,5 @@ private: } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Meta.cpp b/cpp/src/db/Meta.cpp index f0539ae1be..cc7525528f 100644 --- a/cpp/src/db/Meta.cpp +++ b/cpp/src/db/Meta.cpp @@ -9,7 +9,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace meta { @@ -44,5 +44,5 @@ DateT Meta::GetDate() { } // namespace meta } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Meta.h b/cpp/src/db/Meta.h index 8c02c0b88b..d8242db884 100644 --- a/cpp/src/db/Meta.h +++ b/cpp/src/db/Meta.h @@ -14,7 +14,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace meta { @@ -70,5 +70,5 @@ public: } // namespace meta } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/MetaConsts.h b/cpp/src/db/MetaConsts.h index e4247510c6..ef0a207eae 100644 --- a/cpp/src/db/MetaConsts.h +++ b/cpp/src/db/MetaConsts.h @@ -6,7 +6,7 @@ #pragma once namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace meta { @@ -28,5 +28,5 @@ const size_t W_SEC = 7*D_SEC; } // namespace meta } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/MetaTypes.h b/cpp/src/db/MetaTypes.h index 64f653611f..a284d14a19 100644 --- a/cpp/src/db/MetaTypes.h +++ b/cpp/src/db/MetaTypes.h @@ -12,7 +12,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace meta { @@ -58,5 +58,5 @@ typedef std::map DatePartionedTableFilesSchema; } // namespace meta } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Options.cpp b/cpp/src/db/Options.cpp index dfd6311b61..74197226fe 100644 --- a/cpp/src/db/Options.cpp +++ b/cpp/src/db/Options.cpp @@ -14,7 +14,7 @@ #include "Exception.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { Options::Options() @@ -71,5 +71,5 @@ void ArchiveConf::ParseType(const std::string& type) { } } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Options.h b/cpp/src/db/Options.h index cd6f1f98b8..31f5cb1d87 100644 --- a/cpp/src/db/Options.h +++ b/cpp/src/db/Options.h @@ -10,7 +10,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class Env; @@ -49,5 +49,5 @@ struct Options { } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Status.cpp b/cpp/src/db/Status.cpp index 5366f34158..76c72fac62 100644 --- a/cpp/src/db/Status.cpp +++ b/cpp/src/db/Status.cpp @@ -9,7 +9,7 @@ #include "Status.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { const char* Status::CopyState(const char* state) { @@ -63,5 +63,5 @@ std::string Status::ToString() const { } } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Status.h b/cpp/src/db/Status.h index 20081676c0..ded32b3394 100644 --- a/cpp/src/db/Status.h +++ b/cpp/src/db/Status.h @@ -8,7 +8,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class Status { @@ -90,5 +90,5 @@ inline Status& Status::operator=(Status&& rhs) noexcept { } } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Types.h b/cpp/src/db/Types.h index 73ecc81fa8..acf7feea40 100644 --- a/cpp/src/db/Types.h +++ b/cpp/src/db/Types.h @@ -8,7 +8,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { typedef long IDNumber; @@ -20,5 +20,5 @@ typedef std::vector QueryResults; } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Utils.cpp b/cpp/src/db/Utils.cpp index 9b40152587..5f38a9c72a 100644 --- a/cpp/src/db/Utils.cpp +++ b/cpp/src/db/Utils.cpp @@ -8,7 +8,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace utils { @@ -22,5 +22,5 @@ long GetMicroSecTimeStamp() { } // namespace utils } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/Utils.h b/cpp/src/db/Utils.h index cdcd37b832..481808d630 100644 --- a/cpp/src/db/Utils.h +++ b/cpp/src/db/Utils.h @@ -7,7 +7,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace utils { @@ -15,5 +15,5 @@ long GetMicroSecTimeStamp(); } // namespace utils } // namespace engine -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/db/scheduler/IScheduleStrategy.h b/cpp/src/db/scheduler/IScheduleStrategy.h index 190125dfdd..a619c2a45e 100644 --- a/cpp/src/db/scheduler/IScheduleStrategy.h +++ b/cpp/src/db/scheduler/IScheduleStrategy.h @@ -9,7 +9,7 @@ #include "SearchContext.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class IScheduleStrategy { diff --git a/cpp/src/db/scheduler/IndexLoaderQueue.cpp b/cpp/src/db/scheduler/IndexLoaderQueue.cpp index 2840e6564e..7d7ae07374 100644 --- a/cpp/src/db/scheduler/IndexLoaderQueue.cpp +++ b/cpp/src/db/scheduler/IndexLoaderQueue.cpp @@ -10,7 +10,7 @@ #include "utils/Log.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { IndexLoaderQueue& diff --git a/cpp/src/db/scheduler/IndexLoaderQueue.h b/cpp/src/db/scheduler/IndexLoaderQueue.h index f0d71dcbd7..150dde8484 100644 --- a/cpp/src/db/scheduler/IndexLoaderQueue.h +++ b/cpp/src/db/scheduler/IndexLoaderQueue.h @@ -14,7 +14,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { diff --git a/cpp/src/db/scheduler/ScheduleStrategy.cpp b/cpp/src/db/scheduler/ScheduleStrategy.cpp index 1e8b5415b8..f80e01a1f4 100644 --- a/cpp/src/db/scheduler/ScheduleStrategy.cpp +++ b/cpp/src/db/scheduler/ScheduleStrategy.cpp @@ -11,7 +11,7 @@ #include "utils/Log.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class MemScheduleStrategy : public IScheduleStrategy { @@ -38,7 +38,7 @@ public: new_loader->search_contexts_.push_back(search_context); new_loader->file_ = pair.second; - auto index = zilliz::vecwise::cache::CpuCacheMgr::GetInstance()->GetIndex(pair.second->location_); + auto index = zilliz::milvus::cache::CpuCacheMgr::GetInstance()->GetIndex(pair.second->location_); if(index != nullptr) { //if the index file has been in memory, increase its priority loader_list.push_front(new_loader); diff --git a/cpp/src/db/scheduler/ScheduleStrategy.h b/cpp/src/db/scheduler/ScheduleStrategy.h index da01d7e745..1fc0493e41 100644 --- a/cpp/src/db/scheduler/ScheduleStrategy.h +++ b/cpp/src/db/scheduler/ScheduleStrategy.h @@ -8,7 +8,7 @@ #include "IScheduleStrategy.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class StrategyFactory { diff --git a/cpp/src/db/scheduler/SearchContext.cpp b/cpp/src/db/scheduler/SearchContext.cpp index 5ce8d37fbe..5bc27f06df 100644 --- a/cpp/src/db/scheduler/SearchContext.cpp +++ b/cpp/src/db/scheduler/SearchContext.cpp @@ -10,7 +10,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { SearchContext::SearchContext(uint64_t topk, uint64_t nq, const float* vectors) diff --git a/cpp/src/db/scheduler/SearchContext.h b/cpp/src/db/scheduler/SearchContext.h index b212ea34d9..72cbfa4f99 100644 --- a/cpp/src/db/scheduler/SearchContext.h +++ b/cpp/src/db/scheduler/SearchContext.h @@ -13,7 +13,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { using TableFileSchemaPtr = std::shared_ptr; diff --git a/cpp/src/db/scheduler/SearchScheduler.cpp b/cpp/src/db/scheduler/SearchScheduler.cpp index c18f95d04d..2235ee9df3 100644 --- a/cpp/src/db/scheduler/SearchScheduler.cpp +++ b/cpp/src/db/scheduler/SearchScheduler.cpp @@ -13,7 +13,7 @@ #include "db/EngineFactory.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace { diff --git a/cpp/src/db/scheduler/SearchScheduler.h b/cpp/src/db/scheduler/SearchScheduler.h index 24c85395fc..8b797908ef 100644 --- a/cpp/src/db/scheduler/SearchScheduler.h +++ b/cpp/src/db/scheduler/SearchScheduler.h @@ -9,7 +9,7 @@ #include "utils/ThreadPool.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class SearchScheduler { diff --git a/cpp/src/db/scheduler/SearchTaskQueue.cpp b/cpp/src/db/scheduler/SearchTaskQueue.cpp index 101dc818c2..f077001f90 100644 --- a/cpp/src/db/scheduler/SearchTaskQueue.cpp +++ b/cpp/src/db/scheduler/SearchTaskQueue.cpp @@ -8,7 +8,7 @@ #include "utils/TimeRecorder.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace { diff --git a/cpp/src/db/scheduler/SearchTaskQueue.h b/cpp/src/db/scheduler/SearchTaskQueue.h index bd8e9d7f24..7231870bd3 100644 --- a/cpp/src/db/scheduler/SearchTaskQueue.h +++ b/cpp/src/db/scheduler/SearchTaskQueue.h @@ -12,7 +12,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class SearchTask { diff --git a/cpp/src/license/GetSysInfo.cpp b/cpp/src/license/GetSysInfo.cpp index bc4b43c1d3..4746fe5eac 100644 --- a/cpp/src/license/GetSysInfo.cpp +++ b/cpp/src/license/GetSysInfo.cpp @@ -7,7 +7,7 @@ #include #include // Not provide path: current work path will be used and system.info. -using namespace zilliz::vecwise; +using namespace zilliz::milvus; void print_usage(const std::string &app_name) { diff --git a/cpp/src/license/LicenseCheck.cpp b/cpp/src/license/LicenseCheck.cpp index 5f9efe0c38..b78d1f96ea 100644 --- a/cpp/src/license/LicenseCheck.cpp +++ b/cpp/src/license/LicenseCheck.cpp @@ -14,7 +14,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { LicenseCheck::LicenseCheck() { diff --git a/cpp/src/license/LicenseCheck.h b/cpp/src/license/LicenseCheck.h index c660f345b4..aa66d132d0 100644 --- a/cpp/src/license/LicenseCheck.h +++ b/cpp/src/license/LicenseCheck.h @@ -9,7 +9,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class LicenseCheck { diff --git a/cpp/src/license/LicenseGenerator.cpp b/cpp/src/license/LicenseGenerator.cpp index c837337a2f..2a83b6b2d1 100644 --- a/cpp/src/license/LicenseGenerator.cpp +++ b/cpp/src/license/LicenseGenerator.cpp @@ -8,7 +8,7 @@ #include "utils/Error.h" -using namespace zilliz::vecwise; +using namespace zilliz::milvus; // Not provide path: current work path will be used and system.info. void diff --git a/cpp/src/license/LicenseLibrary.cpp b/cpp/src/license/LicenseLibrary.cpp index d67d7cdcd4..0bb616f5ea 100644 --- a/cpp/src/license/LicenseLibrary.cpp +++ b/cpp/src/license/LicenseLibrary.cpp @@ -21,7 +21,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { constexpr int LicenseLibrary::sha256_length_; diff --git a/cpp/src/license/LicenseLibrary.h b/cpp/src/license/LicenseLibrary.h index d5e97ac8a3..3340e60caa 100644 --- a/cpp/src/license/LicenseLibrary.h +++ b/cpp/src/license/LicenseLibrary.h @@ -15,7 +15,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class LicenseLibrary { diff --git a/cpp/src/main.cpp b/cpp/src/main.cpp index 32f7c515e3..6cbb0e489c 100644 --- a/cpp/src/main.cpp +++ b/cpp/src/main.cpp @@ -22,12 +22,12 @@ INITIALIZE_EASYLOGGINGPP void print_help(const std::string &app_name); -using namespace zilliz::vecwise; +using namespace zilliz::milvus; int main(int argc, char *argv[]) { - printf("Megasearch %s version: v%s built at %s\n", BUILD_TYPE, MEGASEARCH_VERSION, BUILD_TIME); - printf("Megasearch server start...\n"); + printf("\nWelcome to use Milvus by Zillz!\n"); + printf("Milvus %s version: v%s built at %s\n", BUILD_TYPE, MEGASEARCH_VERSION, BUILD_TIME); signal(SIGINT, server::SignalUtil::HandleSignal); signal(SIGSEGV, server::SignalUtil::HandleSignal); @@ -53,7 +53,7 @@ main(int argc, char *argv[]) { if(argc < 2) { print_help(app_name); - printf("Vecwise engine server exit...\n"); + printf("Milvus server exit...\n"); return EXIT_FAILURE; } @@ -98,7 +98,7 @@ main(int argc, char *argv[]) { } } - zilliz::vecwise::server::InitLog(log_config_file); + zilliz::milvus::server::InitLog(log_config_file); server::Server* server_ptr = server::Server::Instance(); server_ptr->Init(start_daemonized, pid_filename, config_filename); diff --git a/cpp/src/metrics/MetricBase.h b/cpp/src/metrics/MetricBase.h index 96dcf22ed6..8755549d1e 100644 --- a/cpp/src/metrics/MetricBase.h +++ b/cpp/src/metrics/MetricBase.h @@ -11,7 +11,7 @@ #include "SystemInfo.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class MetricsBase{ public: diff --git a/cpp/src/metrics/Metrics.cpp b/cpp/src/metrics/Metrics.cpp index 1bacf4ff0b..925bb4cd5c 100644 --- a/cpp/src/metrics/Metrics.cpp +++ b/cpp/src/metrics/Metrics.cpp @@ -9,7 +9,7 @@ #include "PrometheusMetrics.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { MetricsBase & diff --git a/cpp/src/metrics/Metrics.h b/cpp/src/metrics/Metrics.h index cce69515e0..be796eb9c4 100644 --- a/cpp/src/metrics/Metrics.h +++ b/cpp/src/metrics/Metrics.h @@ -16,7 +16,7 @@ //#include "PrometheusMetrics.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { #define METRICS_NOW_TIME std::chrono::system_clock::now() diff --git a/cpp/src/metrics/PrometheusMetrics.cpp b/cpp/src/metrics/PrometheusMetrics.cpp index 8672817428..4a993d4cb8 100644 --- a/cpp/src/metrics/PrometheusMetrics.cpp +++ b/cpp/src/metrics/PrometheusMetrics.cpp @@ -10,7 +10,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { ServerError diff --git a/cpp/src/metrics/PrometheusMetrics.h b/cpp/src/metrics/PrometheusMetrics.h index fc2bef6f60..942598a60f 100644 --- a/cpp/src/metrics/PrometheusMetrics.h +++ b/cpp/src/metrics/PrometheusMetrics.h @@ -22,7 +22,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { diff --git a/cpp/src/metrics/SystemInfo.cpp b/cpp/src/metrics/SystemInfo.cpp index 210817f856..9aa85ccd94 100644 --- a/cpp/src/metrics/SystemInfo.cpp +++ b/cpp/src/metrics/SystemInfo.cpp @@ -17,7 +17,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { void SystemInfo::Init() { diff --git a/cpp/src/metrics/SystemInfo.h b/cpp/src/metrics/SystemInfo.h index 042358c3df..0ac2499bdc 100644 --- a/cpp/src/metrics/SystemInfo.h +++ b/cpp/src/metrics/SystemInfo.h @@ -20,7 +20,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class SystemInfo { diff --git a/cpp/src/server/MegasearchHandler.cpp b/cpp/src/server/MegasearchHandler.cpp index af2a5a7437..5ad7169b68 100644 --- a/cpp/src/server/MegasearchHandler.cpp +++ b/cpp/src/server/MegasearchHandler.cpp @@ -9,7 +9,7 @@ #include "utils/TimeRecorder.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { using namespace megasearch; diff --git a/cpp/src/server/MegasearchHandler.h b/cpp/src/server/MegasearchHandler.h index 6719f282af..0a48c66bbc 100644 --- a/cpp/src/server/MegasearchHandler.h +++ b/cpp/src/server/MegasearchHandler.h @@ -11,7 +11,7 @@ #include "MegasearchService.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class MegasearchServiceHandler : virtual public megasearch::thrift::MegasearchServiceIf { diff --git a/cpp/src/server/MegasearchScheduler.cpp b/cpp/src/server/MegasearchScheduler.cpp index fb6c74d51e..ffbebc8418 100644 --- a/cpp/src/server/MegasearchScheduler.cpp +++ b/cpp/src/server/MegasearchScheduler.cpp @@ -10,7 +10,7 @@ #include "megasearch_constants.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { using namespace megasearch; diff --git a/cpp/src/server/MegasearchScheduler.h b/cpp/src/server/MegasearchScheduler.h index 89648599cf..dd569fc35e 100644 --- a/cpp/src/server/MegasearchScheduler.h +++ b/cpp/src/server/MegasearchScheduler.h @@ -12,7 +12,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class BaseTask { diff --git a/cpp/src/server/MegasearchServer.cpp b/cpp/src/server/MegasearchServer.cpp index 459402c879..0e4ef9c45d 100644 --- a/cpp/src/server/MegasearchServer.cpp +++ b/cpp/src/server/MegasearchServer.cpp @@ -23,7 +23,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { using namespace megasearch::thrift; diff --git a/cpp/src/server/MegasearchServer.h b/cpp/src/server/MegasearchServer.h index 62675e2484..854d89fc1a 100644 --- a/cpp/src/server/MegasearchServer.h +++ b/cpp/src/server/MegasearchServer.h @@ -9,7 +9,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class MegasearchServer { diff --git a/cpp/src/server/MegasearchTask.cpp b/cpp/src/server/MegasearchTask.cpp index faeb16b7b3..46687aed87 100644 --- a/cpp/src/server/MegasearchTask.cpp +++ b/cpp/src/server/MegasearchTask.cpp @@ -14,21 +14,21 @@ #include "version.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { static const std::string DQL_TASK_GROUP = "dql"; static const std::string DDL_DML_TASK_GROUP = "ddl_dml"; static const std::string PING_TASK_GROUP = "ping"; -using DB_META = zilliz::vecwise::engine::meta::Meta; -using DB_DATE = zilliz::vecwise::engine::meta::DateT; +using DB_META = zilliz::milvus::engine::meta::Meta; +using DB_DATE = zilliz::milvus::engine::meta::DateT; namespace { class DBWrapper { public: DBWrapper() { - zilliz::vecwise::engine::Options opt; + zilliz::milvus::engine::Options opt; ConfigNode& config = ServerConfig::GetInstance().GetConfig(CONFIG_DB); opt.meta.backend_uri = config.GetValue(CONFIG_DB_URL); std::string db_path = config.GetValue(CONFIG_DB_PATH); @@ -37,7 +37,7 @@ namespace { CommonUtil::CreateDirectory(opt.meta.path); - zilliz::vecwise::engine::DB::Open(opt, &db_); + zilliz::milvus::engine::DB::Open(opt, &db_); if(db_ == nullptr) { SERVER_LOG_ERROR << "Failed to open db"; throw ServerException(SERVER_NULL_POINTER, "Failed to open db"); @@ -48,13 +48,13 @@ namespace { delete db_; } - zilliz::vecwise::engine::DB* DB() { return db_; } + zilliz::milvus::engine::DB* DB() { return db_; } private: - zilliz::vecwise::engine::DB* db_ = nullptr; + zilliz::milvus::engine::DB* db_ = nullptr; }; - zilliz::vecwise::engine::DB* DB() { + zilliz::milvus::engine::DB* DB() { static DBWrapper db_wrapper; return db_wrapper.DB(); } diff --git a/cpp/src/server/MegasearchTask.h b/cpp/src/server/MegasearchTask.h index 63a08751d4..d99a3f7881 100644 --- a/cpp/src/server/MegasearchTask.h +++ b/cpp/src/server/MegasearchTask.h @@ -16,7 +16,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { using namespace megasearch; diff --git a/cpp/src/server/MegasearchThreadPoolServer.cpp b/cpp/src/server/MegasearchThreadPoolServer.cpp index d227442a45..6d7bb8c200 100644 --- a/cpp/src/server/MegasearchThreadPoolServer.cpp +++ b/cpp/src/server/MegasearchThreadPoolServer.cpp @@ -7,7 +7,7 @@ #include "MegasearchThreadPoolServer.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { void @@ -21,7 +21,7 @@ MegasearchThreadPoolServer::onClientDisconnected(apache::thrift::server::TConnec server::Metrics::GetInstance().ConnectionGaugeDecrement(); TThreadPoolServer::onClientDisconnected(pClient); } -zilliz::vecwise::server::MegasearchThreadPoolServer::MegasearchThreadPoolServer(const std::shared_ptr &processor, +zilliz::milvus::server::MegasearchThreadPoolServer::MegasearchThreadPoolServer(const std::shared_ptr &processor, const std::shared_ptr &serverTransport, const std::shared_ptr &transportFactory, const std::shared_ptr &protocolFactory, diff --git a/cpp/src/server/MegasearchThreadPoolServer.h b/cpp/src/server/MegasearchThreadPoolServer.h index 309c17ef3f..57495c7751 100644 --- a/cpp/src/server/MegasearchThreadPoolServer.h +++ b/cpp/src/server/MegasearchThreadPoolServer.h @@ -10,7 +10,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class MegasearchThreadPoolServer : public apache::thrift::server::TThreadPoolServer { diff --git a/cpp/src/server/Server.cpp b/cpp/src/server/Server.cpp index fa093c1bca..f8d2405c9c 100644 --- a/cpp/src/server/Server.cpp +++ b/cpp/src/server/Server.cpp @@ -23,7 +23,7 @@ #include "metrics/Metrics.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { Server* @@ -52,7 +52,7 @@ Server::Daemonize() { return; } - SERVER_LOG_INFO << "Vecwise server run in daemonize mode"; + SERVER_LOG_INFO << "Milvus server run in daemonize mode"; // std::string log_path(GetLogDirFullPath()); // log_path += "zdb_server.(INFO/WARNNING/ERROR/CRITICAL)"; @@ -152,9 +152,6 @@ Server::Start() { ServerConfig &config = ServerConfig::GetInstance(); ConfigNode server_config = config.GetConfig(CONFIG_SERVER); - //print config into console and log - config.PrintAll(); - #ifdef ENABLE_LICENSE ConfigNode license_config = config.GetConfig(CONFIG_LICENSE); std::string license_file_path = license_config.GetValue(CONFIG_LICENSE_PATH); @@ -174,11 +171,11 @@ Server::Start() { signal(SIGTERM, SignalUtil::HandleSignal); server::Metrics::GetInstance().Init(); server::SystemInfo::GetInstance().Init(); - SERVER_LOG_INFO << "Vecwise server is running..."; + printf("Milvus server start successfully.\n"); StartService(); } catch(std::exception& ex){ - SERVER_LOG_ERROR << "Vecwise server encounter exception: " << std::string(ex.what()) + SERVER_LOG_ERROR << "Milvus server encounter exception: " << std::string(ex.what()) << "Is another server instance running?"; break; } @@ -190,7 +187,7 @@ Server::Start() { void Server::Stop() { - SERVER_LOG_INFO << "Vecwise server will be closed"; + printf("Milvus server is going to shutdown ...\n"); // Unlock and close lockfile if (pid_fd != -1) { @@ -219,8 +216,6 @@ Server::Stop() { #ifdef ENABLE_LICENSE server::LicenseCheck::GetInstance().StopCountingDown(); #endif - - SERVER_LOG_INFO << "Vecwise server closed"; } diff --git a/cpp/src/server/Server.h b/cpp/src/server/Server.h index 85478530d1..58e676f7ff 100644 --- a/cpp/src/server/Server.h +++ b/cpp/src/server/Server.h @@ -11,7 +11,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class Server { diff --git a/cpp/src/server/ServerConfig.cpp b/cpp/src/server/ServerConfig.cpp index d17af0ae25..736a249e25 100644 --- a/cpp/src/server/ServerConfig.cpp +++ b/cpp/src/server/ServerConfig.cpp @@ -14,7 +14,7 @@ #include "config/IConfigMgr.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { ServerConfig& diff --git a/cpp/src/server/ServerConfig.h b/cpp/src/server/ServerConfig.h index 407dfa7e1f..c7e02d2177 100644 --- a/cpp/src/server/ServerConfig.h +++ b/cpp/src/server/ServerConfig.h @@ -11,7 +11,7 @@ #include "yaml-cpp/yaml.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { static const std::string CONFIG_SERVER = "server_config"; diff --git a/cpp/src/utils/AttributeSerializer.cpp b/cpp/src/utils/AttributeSerializer.cpp index 2c6fe3220b..b351262e60 100644 --- a/cpp/src/utils/AttributeSerializer.cpp +++ b/cpp/src/utils/AttributeSerializer.cpp @@ -8,7 +8,7 @@ #include "StringHelpFunctions.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { diff --git a/cpp/src/utils/AttributeSerializer.h b/cpp/src/utils/AttributeSerializer.h index 0157d69e88..8d0341aa2e 100644 --- a/cpp/src/utils/AttributeSerializer.h +++ b/cpp/src/utils/AttributeSerializer.h @@ -10,7 +10,7 @@ #include "Error.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { using AttribMap = std::map; diff --git a/cpp/src/utils/BlockingQueue.h b/cpp/src/utils/BlockingQueue.h index cd94997ffd..a77afd7f96 100644 --- a/cpp/src/utils/BlockingQueue.h +++ b/cpp/src/utils/BlockingQueue.h @@ -12,7 +12,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { template diff --git a/cpp/src/utils/BlockingQueue.inl b/cpp/src/utils/BlockingQueue.inl index f7677ae6c3..e703f01576 100644 --- a/cpp/src/utils/BlockingQueue.inl +++ b/cpp/src/utils/BlockingQueue.inl @@ -4,7 +4,7 @@ #include "Error.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { template diff --git a/cpp/src/utils/CommonUtil.cpp b/cpp/src/utils/CommonUtil.cpp index 910fed0f79..0583150d86 100644 --- a/cpp/src/utils/CommonUtil.cpp +++ b/cpp/src/utils/CommonUtil.cpp @@ -27,7 +27,7 @@ #endif namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { namespace fs = boost::filesystem; diff --git a/cpp/src/utils/CommonUtil.h b/cpp/src/utils/CommonUtil.h index 4a8c9e4e84..4de87badbc 100755 --- a/cpp/src/utils/CommonUtil.h +++ b/cpp/src/utils/CommonUtil.h @@ -11,7 +11,7 @@ #include "Error.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class CommonUtil { diff --git a/cpp/src/utils/Error.h b/cpp/src/utils/Error.h index eb8d820d04..bfb19f47a9 100644 --- a/cpp/src/utils/Error.h +++ b/cpp/src/utils/Error.h @@ -10,7 +10,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { using ServerError = int32_t; @@ -58,6 +58,6 @@ private: }; } // namespace server -} // namespace vecwise +} // namespace milvus } // namespace zilliz diff --git a/cpp/src/utils/Log.h b/cpp/src/utils/Log.h index 5d1ef0a487..62c58d5fa1 100644 --- a/cpp/src/utils/Log.h +++ b/cpp/src/utils/Log.h @@ -9,7 +9,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { #define SERVER_DOMAIN_NAME "[SERVER] " @@ -30,8 +30,8 @@ namespace server { #define SERVER_CHECK(func) \ { \ - zilliz::vecwise::server::ServerError error = func; \ - if (error != zilliz::vecwise::server::SERVER_SUCCESS) { \ + zilliz::milvus::server::ServerError error = func; \ + if (error != zilliz::milvus::server::SERVER_SUCCESS) { \ return SERVER_ERROR(error); \ } \ } \ diff --git a/cpp/src/utils/LogUtil.cpp b/cpp/src/utils/LogUtil.cpp index dda991785f..07f3b92aa5 100644 --- a/cpp/src/utils/LogUtil.cpp +++ b/cpp/src/utils/LogUtil.cpp @@ -10,7 +10,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { int32_t InitLog(const std::string& log_config_file) { @@ -57,5 +57,5 @@ int32_t InitLog(const std::string& log_config_file) { } // server -} // vecwise +} // milvus } // zilliz diff --git a/cpp/src/utils/LogUtil.h b/cpp/src/utils/LogUtil.h index 17d2fac418..4a5b463c42 100644 --- a/cpp/src/utils/LogUtil.h +++ b/cpp/src/utils/LogUtil.h @@ -9,7 +9,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { int32_t InitLog(const std::string& log_config_file); diff --git a/cpp/src/utils/SignalUtil.cpp b/cpp/src/utils/SignalUtil.cpp index 77b7a4ee2d..35683b34ef 100644 --- a/cpp/src/utils/SignalUtil.cpp +++ b/cpp/src/utils/SignalUtil.cpp @@ -11,11 +11,11 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { void SignalUtil::HandleSignal(int signum){ - SERVER_LOG_INFO << "Server received signal:" << std::to_string(signum); + switch(signum){ case SIGINT: @@ -26,6 +26,7 @@ void SignalUtil::HandleSignal(int signum){ exit(0); } default:{ + SERVER_LOG_INFO << "Server received signal:" << std::to_string(signum); SignalUtil::PrintStacktrace(); std::string info = "Server encounter critical signal:"; diff --git a/cpp/src/utils/SignalUtil.h b/cpp/src/utils/SignalUtil.h index d713d9caa2..a8fbf54d48 100644 --- a/cpp/src/utils/SignalUtil.h +++ b/cpp/src/utils/SignalUtil.h @@ -6,7 +6,7 @@ #pragma once namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class SignalUtil { diff --git a/cpp/src/utils/StringHelpFunctions.cpp b/cpp/src/utils/StringHelpFunctions.cpp index 0b724a1a97..aaefd7236a 100644 --- a/cpp/src/utils/StringHelpFunctions.cpp +++ b/cpp/src/utils/StringHelpFunctions.cpp @@ -6,7 +6,7 @@ #include "StringHelpFunctions.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { void StringHelpFunctions::TrimStringLineBreak(std::string &string) { diff --git a/cpp/src/utils/StringHelpFunctions.h b/cpp/src/utils/StringHelpFunctions.h index 58784b2acd..2521c48e22 100644 --- a/cpp/src/utils/StringHelpFunctions.h +++ b/cpp/src/utils/StringHelpFunctions.h @@ -10,7 +10,7 @@ #include namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class StringHelpFunctions { diff --git a/cpp/src/utils/ThreadPool.h b/cpp/src/utils/ThreadPool.h index 13d877bb05..cf7cc56c65 100644 --- a/cpp/src/utils/ThreadPool.h +++ b/cpp/src/utils/ThreadPool.h @@ -19,7 +19,7 @@ #define MAX_THREADS_NUM 32 namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class ThreadPool { diff --git a/cpp/src/utils/TimeRecorder.cpp b/cpp/src/utils/TimeRecorder.cpp index 5d16a4c639..fb3cb421a1 100644 --- a/cpp/src/utils/TimeRecorder.cpp +++ b/cpp/src/utils/TimeRecorder.cpp @@ -8,7 +8,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { TimeRecorder::TimeRecorder(const std::string &header, diff --git a/cpp/src/utils/TimeRecorder.h b/cpp/src/utils/TimeRecorder.h index 676dc185ea..9b960dc0ea 100644 --- a/cpp/src/utils/TimeRecorder.h +++ b/cpp/src/utils/TimeRecorder.h @@ -10,7 +10,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace server { class TimeRecorder { diff --git a/cpp/src/wrapper/Index.cpp b/cpp/src/wrapper/Index.cpp index 6b04ba05b4..35dd646fdf 100644 --- a/cpp/src/wrapper/Index.cpp +++ b/cpp/src/wrapper/Index.cpp @@ -15,7 +15,7 @@ #include "faiss/index_io.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { using std::string; diff --git a/cpp/src/wrapper/Index.h b/cpp/src/wrapper/Index.h index 460fdefcf1..ba157348d4 100644 --- a/cpp/src/wrapper/Index.h +++ b/cpp/src/wrapper/Index.h @@ -18,7 +18,7 @@ #include "Operand.h" namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class Index; diff --git a/cpp/src/wrapper/IndexBuilder.cpp b/cpp/src/wrapper/IndexBuilder.cpp index 9470a33b29..43cbb73235 100644 --- a/cpp/src/wrapper/IndexBuilder.cpp +++ b/cpp/src/wrapper/IndexBuilder.cpp @@ -23,7 +23,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class GpuResources { @@ -34,7 +34,7 @@ class GpuResources { } void SelectGpu() { - using namespace zilliz::vecwise::server; + using namespace zilliz::milvus::server; ServerConfig &config = ServerConfig::GetInstance(); ConfigNode server_config = config.GetConfig(CONFIG_SERVER); gpu_num = server_config.GetInt32Value("gpu_index", 0); @@ -107,7 +107,7 @@ Index_ptr IndexBuilder::build_all(const long &nb, const vector &xb, return build_all(nb, xb.data(), ids.data(), nt, xt.data()); } -BgCpuBuilder::BgCpuBuilder(const zilliz::vecwise::engine::Operand_ptr &opd) : IndexBuilder(opd) {}; +BgCpuBuilder::BgCpuBuilder(const zilliz::milvus::engine::Operand_ptr &opd) : IndexBuilder(opd) {}; Index_ptr BgCpuBuilder::build_all(const long &nb, const float *xb, const long *ids, const long &nt, const float *xt) { std::shared_ptr index = nullptr; diff --git a/cpp/src/wrapper/IndexBuilder.h b/cpp/src/wrapper/IndexBuilder.h index 996e3970e3..8752063560 100644 --- a/cpp/src/wrapper/IndexBuilder.h +++ b/cpp/src/wrapper/IndexBuilder.h @@ -13,7 +13,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { class IndexBuilder { diff --git a/cpp/src/wrapper/Operand.cpp b/cpp/src/wrapper/Operand.cpp index e3c4155086..25341676a6 100644 --- a/cpp/src/wrapper/Operand.cpp +++ b/cpp/src/wrapper/Operand.cpp @@ -8,7 +8,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { using std::string; diff --git a/cpp/src/wrapper/Operand.h b/cpp/src/wrapper/Operand.h index f20cb30894..85a0eb8080 100644 --- a/cpp/src/wrapper/Operand.h +++ b/cpp/src/wrapper/Operand.h @@ -13,7 +13,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { struct Operand { diff --git a/cpp/src/wrapper/gpu/Arithmetic.h b/cpp/src/wrapper/gpu/Arithmetic.h index 6a49e8d334..1b6d7a98c1 100644 --- a/cpp/src/wrapper/gpu/Arithmetic.h +++ b/cpp/src/wrapper/gpu/Arithmetic.h @@ -12,7 +12,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { using Bool = int8_t; diff --git a/cpp/src/wrapper/gpu/Topk.cu b/cpp/src/wrapper/gpu/Topk.cu index 10978c8151..0c857ff683 100644 --- a/cpp/src/wrapper/gpu/Topk.cu +++ b/cpp/src/wrapper/gpu/Topk.cu @@ -12,8 +12,8 @@ namespace faiss { namespace gpu { -constexpr bool kBoolMax = zilliz::vecwise::engine::kBoolMax; -constexpr bool kBoolMin = zilliz::vecwise::engine::kBoolMin; +constexpr bool kBoolMax = zilliz::milvus::engine::kBoolMax; +constexpr bool kBoolMin = zilliz::milvus::engine::kBoolMin; template<> struct Limits { @@ -27,8 +27,8 @@ struct Limits { } }; -constexpr int8_t kInt8Max = zilliz::vecwise::engine::kInt8Max; -constexpr int8_t kInt8Min = zilliz::vecwise::engine::kInt8Min; +constexpr int8_t kInt8Max = zilliz::milvus::engine::kInt8Max; +constexpr int8_t kInt8Min = zilliz::milvus::engine::kInt8Min; template<> struct Limits { @@ -42,8 +42,8 @@ struct Limits { } }; -constexpr int16_t kInt16Max = zilliz::vecwise::engine::kInt16Max; -constexpr int16_t kInt16Min = zilliz::vecwise::engine::kInt16Min; +constexpr int16_t kInt16Max = zilliz::milvus::engine::kInt16Max; +constexpr int16_t kInt16Min = zilliz::milvus::engine::kInt16Min; template<> struct Limits { @@ -57,8 +57,8 @@ struct Limits { } }; -constexpr int64_t kInt64Max = zilliz::vecwise::engine::kInt64Max; -constexpr int64_t kInt64Min = zilliz::vecwise::engine::kInt64Min; +constexpr int64_t kInt64Max = zilliz::milvus::engine::kInt64Max; +constexpr int64_t kInt64Min = zilliz::milvus::engine::kInt64Min; template<> struct Limits { @@ -72,8 +72,8 @@ struct Limits { } }; -constexpr double kDoubleMax = zilliz::vecwise::engine::kDoubleMax; -constexpr double kDoubleMin = zilliz::vecwise::engine::kDoubleMin; +constexpr double kDoubleMax = zilliz::milvus::engine::kDoubleMax; +constexpr double kDoubleMin = zilliz::milvus::engine::kDoubleMin; template<> struct Limits { @@ -102,7 +102,7 @@ struct Limits { namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace gpu { diff --git a/cpp/src/wrapper/gpu/Topk.h b/cpp/src/wrapper/gpu/Topk.h index ed6c233ff6..62d5756b4c 100644 --- a/cpp/src/wrapper/gpu/Topk.h +++ b/cpp/src/wrapper/gpu/Topk.h @@ -11,7 +11,7 @@ namespace zilliz { -namespace vecwise { +namespace milvus { namespace engine { namespace gpu { diff --git a/cpp/unittest/db/db_tests.cpp b/cpp/unittest/db/db_tests.cpp index 6f968d475f..1538dd486a 100644 --- a/cpp/unittest/db/db_tests.cpp +++ b/cpp/unittest/db/db_tests.cpp @@ -12,7 +12,7 @@ #include "db/DBImpl.h" #include "db/MetaConsts.h" -using namespace zilliz::vecwise; +using namespace zilliz::milvus; TEST_F(DBTest, CONFIG_TEST) { { diff --git a/cpp/unittest/db/meta_tests.cpp b/cpp/unittest/db/meta_tests.cpp index 0345f85e95..36efff2905 100644 --- a/cpp/unittest/db/meta_tests.cpp +++ b/cpp/unittest/db/meta_tests.cpp @@ -15,7 +15,7 @@ #include "db/Utils.h" #include "db/MetaConsts.h" -using namespace zilliz::vecwise::engine; +using namespace zilliz::milvus::engine; TEST_F(MetaTest, GROUP_TEST) { auto table_id = "meta_test_group"; diff --git a/cpp/unittest/db/utils.cpp b/cpp/unittest/db/utils.cpp index 3e7c588ef6..32c2ba71ce 100644 --- a/cpp/unittest/db/utils.cpp +++ b/cpp/unittest/db/utils.cpp @@ -12,7 +12,7 @@ #include "utils.h" #include "db/Factories.h" -using namespace zilliz::vecwise; +using namespace zilliz::milvus; void ASSERT_STATS(engine::Status& stat) { ASSERT_TRUE(stat.ok()); diff --git a/cpp/unittest/db/utils.h b/cpp/unittest/db/utils.h index 456b54ffcc..cf0ff360f1 100644 --- a/cpp/unittest/db/utils.h +++ b/cpp/unittest/db/utils.h @@ -29,28 +29,28 @@ #endif -void ASSERT_STATS(zilliz::vecwise::engine::Status& stat); +void ASSERT_STATS(zilliz::milvus::engine::Status& stat); class DBTest : public ::testing::Test { protected: - zilliz::vecwise::engine::DB* db_; + zilliz::milvus::engine::DB* db_; void InitLog(); virtual void SetUp() override; virtual void TearDown() override; - virtual zilliz::vecwise::engine::Options GetOptions(); + virtual zilliz::milvus::engine::Options GetOptions(); }; class DBTest2 : public DBTest { protected: - virtual zilliz::vecwise::engine::Options GetOptions() override; + virtual zilliz::milvus::engine::Options GetOptions() override; }; class MetaTest : public DBTest { protected: - std::shared_ptr impl_; + std::shared_ptr impl_; virtual void SetUp() override; virtual void TearDown() override; diff --git a/cpp/unittest/faiss_wrapper/topk_test.cpp b/cpp/unittest/faiss_wrapper/topk_test.cpp index 9c972783fc..7bcd28a7ff 100644 --- a/cpp/unittest/faiss_wrapper/topk_test.cpp +++ b/cpp/unittest/faiss_wrapper/topk_test.cpp @@ -9,7 +9,7 @@ #include "wrapper/gpu/Topk.h" -using namespace zilliz::vecwise::engine; +using namespace zilliz::milvus::engine; constexpr float threshhold = 0.00001; diff --git a/cpp/unittest/faiss_wrapper/wrapper_test.cpp b/cpp/unittest/faiss_wrapper/wrapper_test.cpp index 480dcad0d3..67a6c3cde8 100644 --- a/cpp/unittest/faiss_wrapper/wrapper_test.cpp +++ b/cpp/unittest/faiss_wrapper/wrapper_test.cpp @@ -10,7 +10,7 @@ #include "wrapper/Index.h" #include "wrapper/IndexBuilder.h" -using namespace zilliz::vecwise::engine; +using namespace zilliz::milvus::engine; TEST(operand_test, Wrapper_Test) { diff --git a/cpp/unittest/license/license_check_test.cpp b/cpp/unittest/license/license_check_test.cpp index 75a8b65010..b0d6e26290 100644 --- a/cpp/unittest/license/license_check_test.cpp +++ b/cpp/unittest/license/license_check_test.cpp @@ -10,7 +10,7 @@ #include -using namespace zilliz::vecwise; +using namespace zilliz::milvus; TEST(LicenseLibraryTest, CHECK_TEST) { diff --git a/cpp/unittest/license/license_library_tests.cpp b/cpp/unittest/license/license_library_tests.cpp index c68f243d4e..329d8f1939 100644 --- a/cpp/unittest/license/license_library_tests.cpp +++ b/cpp/unittest/license/license_library_tests.cpp @@ -13,7 +13,7 @@ #include -using namespace zilliz::vecwise; +using namespace zilliz::milvus; TEST(LicenseLibraryTest, FILE_EXISTENT_TEST) { diff --git a/cpp/unittest/metrics/metrics_test.cpp b/cpp/unittest/metrics/metrics_test.cpp index 2aa23f8c47..9fb5f9c209 100644 --- a/cpp/unittest/metrics/metrics_test.cpp +++ b/cpp/unittest/metrics/metrics_test.cpp @@ -21,7 +21,7 @@ #include "db/Factories.h" -using namespace zilliz::vecwise; +using namespace zilliz::milvus; @@ -32,8 +32,8 @@ TEST_F(DBTest, Metric_Tes) { // server::Metrics::GetInstance().exposer_ptr()->RegisterCollectable(server::Metrics::GetInstance().registry_ptr()); server::Metrics::GetInstance().Init(); // server::PrometheusMetrics::GetInstance().exposer_ptr()->RegisterCollectable(server::PrometheusMetrics::GetInstance().registry_ptr()); - zilliz::vecwise::cache::CpuCacheMgr::GetInstance()->SetCapacity(2UL*1024*1024*1024); - std::cout<CacheCapacity()<SetCapacity(2UL*1024*1024*1024); + std::cout<CacheCapacity()< attrib; diff --git a/cpp/unittest/vecwise_test.cpp b/cpp/unittest/vecwise_test.cpp index 0ffec69fdb..930310fd93 100644 --- a/cpp/unittest/vecwise_test.cpp +++ b/cpp/unittest/vecwise_test.cpp @@ -12,12 +12,12 @@ INITIALIZE_EASYLOGGINGPP -using namespace zilliz::vecwise; +using namespace zilliz::milvus; int main(int argc, char **argv) { std::string exe_path = server::CommonUtil::GetExePath(); std::string config_filename = exe_path + "/../../../conf/server_config.yaml"; - zilliz::vecwise::server::ServerConfig& config = zilliz::vecwise::server::ServerConfig::GetInstance(); + zilliz::milvus::server::ServerConfig& config = zilliz::milvus::server::ServerConfig::GetInstance(); config.LoadConfigFile(config_filename); std::cout << "Load config file form: " << config_filename << std::endl; From b749e7ec50ac616c6d6fbb7f0dbb8c209a1684a5 Mon Sep 17 00:00:00 2001 From: jinhai Date: Thu, 13 Jun 2019 16:54:49 +0800 Subject: [PATCH 6/6] MS-82 Update Former-commit-id: c8dd35401e0fd15df7f140978e37c7a0e6a363f7 --- cpp/src/server/Server.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cpp/src/server/Server.cpp b/cpp/src/server/Server.cpp index f8d2405c9c..7acc4b78d0 100644 --- a/cpp/src/server/Server.cpp +++ b/cpp/src/server/Server.cpp @@ -193,11 +193,13 @@ Server::Stop() { if (pid_fd != -1) { int ret = lockf(pid_fd, F_ULOCK, 0); if(ret != 0){ - + printf("Can't lock file: %s\n", strerror(errno)); + exit(0); } ret = close(pid_fd); if(ret != 0){ - + printf("Can't close file: %s\n", strerror(errno)); + exit(0); } } @@ -205,7 +207,8 @@ Server::Stop() { if (!pid_filename_.empty()) { int ret = unlink(pid_filename_.c_str()); if(ret != 0){ - + printf("Can't unlink file: %s\n", strerror(errno)); + exit(0); } } @@ -216,6 +219,7 @@ Server::Stop() { #ifdef ENABLE_LICENSE server::LicenseCheck::GetInstance().StopCountingDown(); #endif + printf("Milvus server is closed!\n"); }