You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
5.4 KiB
120 lines
5.4 KiB
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index f97f96b5bf..f5e5d06d35 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -657,13 +657,13 @@ if(WITH_SYSTEM_BOOST)
|
|
if(BOOST_ROOT AND CMAKE_LIBRARY_ARCHITECTURE)
|
|
set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
|
endif()
|
|
- find_package(Boost 1.67 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
|
+ find_package(Boost 1.70 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
|
else()
|
|
set(BOOST_J 1 CACHE STRING
|
|
"max jobs for Boost build") # override w/-DBOOST_J=<n>
|
|
set(Boost_USE_STATIC_LIBS ON)
|
|
include(BuildBoost)
|
|
- build_boost(1.67
|
|
+ build_boost(1.70
|
|
COMPONENTS ${BOOST_COMPONENTS} ${BOOST_HEADER_COMPONENTS})
|
|
endif()
|
|
include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS})
|
|
diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
|
|
index f46cc0d485..4254508570 100644
|
|
--- a/cmake/modules/BuildBoost.cmake
|
|
+++ b/cmake/modules/BuildBoost.cmake
|
|
@@ -137,14 +137,14 @@ function(do_build_boost version)
|
|
check_boost_version("${PROJECT_SOURCE_DIR}/src/boost" ${version})
|
|
set(source_dir
|
|
SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/boost")
|
|
- elseif(version VERSION_GREATER 1.67)
|
|
+ elseif(version VERSION_GREATER 1.70)
|
|
message(FATAL_ERROR "Unknown BOOST_REQUESTED_VERSION: ${version}")
|
|
else()
|
|
message(STATUS "boost will be downloaded...")
|
|
# NOTE: If you change this version number make sure the package is available
|
|
# at the three URLs below (may involve uploading to download.ceph.com)
|
|
- set(boost_version 1.67.0)
|
|
- set(boost_sha256 2684c972994ee57fc5632e03bf044746f6eb45d4920c343937a465fd67a5adba)
|
|
+ set(boost_version 1.70.0)
|
|
+ set(boost_sha256 430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778)
|
|
string(REPLACE "." "_" boost_version_underscore ${boost_version} )
|
|
set(boost_url
|
|
https://dl.bintray.com/boostorg/release/${boost_version}/source/boost_${boost_version_underscore}.tar.bz2)
|
|
diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc
|
|
index e4be074ec7..4af3695dc1 100644
|
|
--- a/src/rgw/rgw_asio_frontend.cc
|
|
+++ b/src/rgw/rgw_asio_frontend.cc
|
|
@@ -81,7 +81,8 @@ class StreamIO : public rgw::asio::ClientIO {
|
|
using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>;
|
|
|
|
template <typename Stream>
|
|
-void handle_connection(RGWProcessEnv& env, Stream& stream,
|
|
+void handle_connection(boost::asio::io_context& context,
|
|
+ RGWProcessEnv& env, Stream& stream,
|
|
boost::beast::flat_buffer& buffer, bool is_ssl,
|
|
SharedMutex& pause_mutex,
|
|
rgw::dmclock::Scheduler *scheduler,
|
|
@@ -152,7 +153,7 @@ void handle_connection(RGWProcessEnv& env, Stream& stream,
|
|
rgw::io::add_conlen_controlling(
|
|
&real_client))));
|
|
RGWRestfulIO client(cct, &real_client_io);
|
|
- auto y = optional_yield{socket.get_io_context(), yield};
|
|
+ auto y = optional_yield{context, yield};
|
|
process_request(env.store, env.rest, &req, env.uri_prefix,
|
|
*env.auth_registry, &client, env.olog, y, scheduler);
|
|
}
|
|
@@ -560,7 +561,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
|
|
return;
|
|
}
|
|
buffer.consume(bytes);
|
|
- handle_connection(env, stream, buffer, true, pause_mutex,
|
|
+ handle_connection(context, env, stream, buffer, true, pause_mutex,
|
|
scheduler.get(), ec, yield);
|
|
if (!ec) {
|
|
// ssl shutdown (ignoring errors)
|
|
@@ -578,7 +579,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
|
|
auto c = connections.add(conn);
|
|
boost::beast::flat_buffer buffer;
|
|
boost::system::error_code ec;
|
|
- handle_connection(env, s, buffer, false, pause_mutex,
|
|
+ handle_connection(context, env, s, buffer, false, pause_mutex,
|
|
scheduler.get(), ec, yield);
|
|
s.shutdown(tcp::socket::shutdown_both, ec);
|
|
});
|
|
diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h
|
|
index 70487a5253..1d454acd2e 100644
|
|
--- a/src/rgw/rgw_dmclock_async_scheduler.h
|
|
+++ b/src/rgw/rgw_dmclock_async_scheduler.h
|
|
@@ -82,7 +82,12 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler {
|
|
using Completion = async::Completion<Signature, async::AsBase<Request>>;
|
|
|
|
using Clock = ceph::coarse_real_clock;
|
|
+#if BOOST_VERSION < 107000
|
|
using Timer = boost::asio::basic_waitable_timer<Clock>;
|
|
+#else
|
|
+ using Timer = boost::asio::basic_waitable_timer<Clock,
|
|
+ boost::asio::wait_traits<Clock>, executor_type>;
|
|
+#endif
|
|
Timer timer; //< timer for the next scheduled request
|
|
|
|
CephContext *const cct;
|
|
diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h
|
|
index d99a6ff68d..213fc238d2 100644
|
|
--- a/src/rgw/rgw_reshard.h
|
|
+++ b/src/rgw/rgw_reshard.h
|
|
@@ -183,7 +183,14 @@ class RGWReshardWait {
|
|
ceph::condition_variable cond;
|
|
|
|
struct Waiter : boost::intrusive::list_base_hook<> {
|
|
- boost::asio::basic_waitable_timer<Clock> timer;
|
|
+#if BOOST_VERSION < 107000
|
|
+ using Timer = boost::asio::basic_waitable_timer<Clock>;
|
|
+#else
|
|
+ using Executor = boost::asio::io_context::executor_type;
|
|
+ using Timer = boost::asio::basic_waitable_timer<Clock,
|
|
+ boost::asio::wait_traits<Clock>, Executor>;
|
|
+#endif
|
|
+ Timer timer;
|
|
explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {}
|
|
};
|
|
boost::intrusive::list<Waiter> waiters;
|