提交 66fb3e20 编写于 作者: J jinhai

Merge branch 'branch-0.4.0' into 'branch-0.4.0'

modify build.sh to make thrift on

See merge request megasearch/milvus!330

Former-commit-id: fef81a57d635804d7d324fad887679913820fd67
......@@ -11,7 +11,7 @@ PROFILING="OFF"
BUILD_FAISS_WITH_MKL="OFF"
USE_JFROG_CACHE="OFF"
KNOWHERE_OPTS=""
MILVUS_WITH_THRIFT="OFF"
MILVUS_WITH_THRIFT="ON"
while getopts "p:d:t:uhlrcgmj" arg
do
......
......@@ -198,25 +198,25 @@ set(knowhere_libs
)
#if (MILVUS_WITH_THRIFT STREQUAL "ON")
add_executable(milvus_thrift_server
${config_files}
${server_files}
${thriftserver_files}
${utils_files}
${thrift_service_files}
${metrics_files}
)
# add_executable(milvus_thrift_server
# ${config_files}
# ${server_files}
# ${thriftserver_files}
# ${utils_files}
# ${thrift_service_files}
# ${metrics_files}
# )
#else()
add_executable(milvus_grpc_server
${config_files}
${server_files}
${grpcserver_files}
${utils_files}
${grpc_service_files}
${metrics_files}
)
# add_executable(milvus_grpc_server
# ${config_files}
# ${server_files}
# ${grpcserver_files}
# ${utils_files}
# ${grpc_service_files}
# ${metrics_files}
# )
#endif()
add_executable(milvus_server
add_executable(milvus_server
${config_files}
${server_files}
${thriftserver_files}
......@@ -234,25 +234,25 @@ if (ENABLE_LICENSE STREQUAL "ON")
target_link_libraries(license_generator ${license_libs} ${third_party_libs})
# if(MILVUS_WITH_THRIFT STREQUAL "ON")
target_link_libraries(milvus_thrift_server ${server_libs} license_check ${knowhere_libs} ${third_party_libs})
# target_link_libraries(milvus_thrift_server ${server_libs} license_check ${knowhere_libs} ${third_party_libs})
# else()
target_link_libraries(milvus_grpc_server ${server_libs} license_check ${knowhere_libs} ${third_party_libs})
# target_link_libraries(milvus_grpc_server ${server_libs} license_check ${knowhere_libs} ${third_party_libs})
# endif()
target_link_libraries(milvus_server ${server_libs} license_check ${knowhere_libs} ${third_party_libs})
else ()
# if(MILVUS_WITH_THRIFT STREQUAL "ON")
target_link_libraries(milvus_thrift_server ${server_libs} ${knowhere_libs} ${third_party_libs})
# target_link_libraries(milvus_thrift_server ${server_libs} ${knowhere_libs} ${third_party_libs})
# else()
target_link_libraries(milvus_grpc_server ${server_libs} ${knowhere_libs} ${third_party_libs})
# target_link_libraries(milvus_grpc_server ${server_libs} ${knowhere_libs} ${third_party_libs})
# endif()
target_link_libraries(milvus_server ${server_libs} ${knowhere_libs} ${third_party_libs})
endif()
#if (MILVUS_WITH_THRIFT STREQUAL "ON")
install(TARGETS milvus_thrift_server DESTINATION bin)
# install(TARGETS milvus_thrift_server DESTINATION bin)
#else()
install(TARGETS milvus_grpc_server DESTINATION bin)
# install(TARGETS milvus_grpc_server DESTINATION bin)
#endif()
install(TARGETS milvus_server DESTINATION bin)
......
......@@ -229,9 +229,6 @@ Server::StartService() {
std::thread grpc_thread = std::thread(&grpc::GrpcMilvusServer::StartService);
thrift_thread.join();
grpc_thread.join();
//
// MilvusServer::StartService();
// grpc::GrpcMilvusServer::StartService();
}
void
......
......@@ -96,14 +96,9 @@ MilvusServer::StartService() {
void
MilvusServer::StopService() {
auto stop_server_worker = [&]{
if(s_server != nullptr) {
s_server->stop();
}
};
std::shared_ptr<std::thread> stop_thread = std::make_shared<std::thread>(stop_server_worker);
stop_thread->join();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册