mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
* Upgrade thirdparty oatpp to v1.0.0 (fix #2153) Signed-off-by: yhz <413554850@qq.com> * adjust header order Signed-off-by: Yhz <yinghao.zou@zilliz.com>
This commit is contained in:
parent
ebb01aa9b2
commit
0a2b77c363
@ -30,6 +30,7 @@ Please mark all change in change log and use the issue from GitHub
|
||||
- \#221 Refactor LOG macro
|
||||
- \#2039 Support Milvus run on SSE CPUs
|
||||
- \#2149 Merge server_cpu_config.template and server_gpu_config.template
|
||||
- \#2153 Upgrade thirdparty oatpp to v1.0.0
|
||||
- \#2167 Merge config file
|
||||
|
||||
## Task
|
||||
|
||||
@ -315,7 +315,7 @@ else ()
|
||||
endif ()
|
||||
|
||||
if (DEFINED ENV{MILVUS_FIU_URL})
|
||||
set(MILVUS_FIU_URL "$ENV{MILVUS_FIU_URL}")
|
||||
set(FIU_SOURCE_URL "$ENV{MILVUS_FIU_URL}")
|
||||
else ()
|
||||
set(FIU_SOURCE_URL "https://github.com/albertito/libfiu/archive/${FIU_VERSION}.tar.gz"
|
||||
"https://gitee.com/quicksilver/libfiu/repository/archive/${FIU_VERSION}.zip")
|
||||
@ -325,7 +325,7 @@ if (DEFINED ENV{MILVUS_OATPP_URL})
|
||||
set(OATPP_SOURCE_URL "$ENV{MILVUS_OATPP_URL}")
|
||||
else ()
|
||||
# set(OATPP_SOURCE_URL "https://github.com/oatpp/oatpp/archive/${OATPP_VERSION}.tar.gz")
|
||||
set(OATPP_SOURCE_URL "https://github.com/BossZou/oatpp/archive/master.zip")
|
||||
set(OATPP_SOURCE_URL "https://github.com/BossZou/oatpp/archive/${OATPP_VERSION}.zip")
|
||||
endif ()
|
||||
|
||||
if (DEFINED ENV{MILVUS_AWS_URL})
|
||||
@ -1021,10 +1021,14 @@ macro(build_oatpp)
|
||||
set(OATPP_DIR_LIB "${OATPP_PREFIX}/lib")
|
||||
|
||||
set(OATPP_CMAKE_ARGS
|
||||
${EP_COMMON_CMAKE_ARGS}
|
||||
"-DCMAKE_INSTALL_PREFIX=${OATPP_PREFIX}"
|
||||
-DCMAKE_INSTALL_LIBDIR=lib
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DOATPP_BUILD_TESTS=OFF
|
||||
-DOATPP_DISABLE_LOGV=ON
|
||||
-DOATPP_DISABLE_LOGD=ON
|
||||
-DOATPP_DISABLE_LOGI=ON
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -11,15 +11,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <oatpp/parser/json/mapping/Serializer.hpp>
|
||||
#include <oatpp/parser/json/mapping/Deserializer.hpp>
|
||||
#include <oatpp/web/server/HttpRouter.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#include <oatpp/core/macro/component.hpp>
|
||||
#include <oatpp/network/client/SimpleTCPConnectionProvider.hpp>
|
||||
#include <oatpp/network/server/SimpleTCPConnectionProvider.hpp>
|
||||
#include <oatpp/parser/json/mapping/Deserializer.hpp>
|
||||
#include <oatpp/parser/json/mapping/Serializer.hpp>
|
||||
#include <oatpp/parser/json/mapping/ObjectMapper.hpp>
|
||||
#include <oatpp/core/macro/component.hpp>
|
||||
|
||||
#include "server/web_impl/handler/WebRequestHandler.h"
|
||||
#include <oatpp/web/server/HttpConnectionHandler.hpp>
|
||||
#include <oatpp/web/server/HttpRouter.hpp>
|
||||
|
||||
namespace milvus {
|
||||
namespace server {
|
||||
@ -41,10 +42,9 @@ class AppComponent {
|
||||
try {
|
||||
return oatpp::network::server::SimpleTCPConnectionProvider::createShared(this->port_);
|
||||
} catch (std::exception& e) {
|
||||
std::string error_msg = "Cannot bind http port " + std::to_string(this->port_) +
|
||||
": " + e.what() +
|
||||
" (errno:" + std::to_string(errno) + "details: " + strerror(errno) + ").";
|
||||
std::cout << error_msg << std::endl;
|
||||
std::string error_msg = "Cannot bind http port " + std::to_string(this->port_) + ". " + e.what() +
|
||||
"(errno: " + std::to_string(errno) + ", details: " + strerror(errno) + ")";
|
||||
std::cerr << error_msg << std::endl;
|
||||
throw std::runtime_error(error_msg);
|
||||
}
|
||||
}());
|
||||
@ -67,8 +67,7 @@ class AppComponent {
|
||||
auto serializerConfig = oatpp::parser::json::mapping::Serializer::Config::createShared();
|
||||
auto deserializerConfig = oatpp::parser::json::mapping::Deserializer::Config::createShared();
|
||||
deserializerConfig->allowUnknownFields = false;
|
||||
return oatpp::parser::json::mapping::ObjectMapper::createShared(serializerConfig,
|
||||
deserializerConfig);
|
||||
return oatpp::parser::json::mapping::ObjectMapper::createShared(serializerConfig, deserializerConfig);
|
||||
}());
|
||||
};
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ class PartitionListDto : public oatpp::data::mapping::type::Object {
|
||||
DTO_INIT(PartitionListDto, Object)
|
||||
|
||||
DTO_FIELD(List<PartitionFieldsDto::ObjectWrapper>::ObjectWrapper, partitions);
|
||||
DTO_FIELD(Int64, count) = 0;
|
||||
DTO_FIELD(Int64, count) = 0L;
|
||||
};
|
||||
|
||||
#include OATPP_CODEGEN_END(DTO)
|
||||
|
||||
@ -24,7 +24,7 @@ class StatusDto: public oatpp::data::mapping::type::Object {
|
||||
DTO_INIT(StatusDto, Object)
|
||||
|
||||
DTO_FIELD(String, message) = "Success";
|
||||
DTO_FIELD(Int64, code) = 0;
|
||||
DTO_FIELD(Int64, code) = 0L;
|
||||
};
|
||||
|
||||
#include OATPP_CODEGEN_END(DTO)
|
||||
|
||||
@ -53,7 +53,7 @@ class TableListFieldsDto : public OObject {
|
||||
DTO_INIT(TableListFieldsDto, Object)
|
||||
|
||||
DTO_FIELD(List<TableFieldsDto::ObjectWrapper>::ObjectWrapper, collections);
|
||||
DTO_FIELD(Int64, count) = 0;
|
||||
DTO_FIELD(Int64, count) = 0L;
|
||||
};
|
||||
|
||||
#include OATPP_CODEGEN_END(DTO)
|
||||
|
||||
2
core/thirdparty/versions.txt
vendored
2
core/thirdparty/versions.txt
vendored
@ -11,7 +11,7 @@ GRPC_VERSION=master
|
||||
ZLIB_VERSION=v1.2.11
|
||||
OPENTRACING_VERSION=v1.5.1
|
||||
FIU_VERSION=1.00
|
||||
OATPP_VERSION=0.19.11
|
||||
OATPP_VERSION=1.0.0
|
||||
AWS_VERSION=1.7.250
|
||||
|
||||
# vim: set filetype=sh:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user