From fad8e86eb26709b792f650c81926c15978b28987 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 9 May 2026 14:39:17 +0800 Subject: [PATCH] rgw/d4n: fix deprecated async_run overload in RedisPool The async_run overload taking a logger argument is deprecated since Boost 1.89. Use the 2-arg async_run(config, token) overload when building with Boost >= 1.89, and fall back to the 3-arg overload for Boost 1.87-1.88. See https://www.boost.org/doc/libs/1_89_0/libs/redis/doc/html/redis/reference/boost/redis/basic_connection/async_run-04.html Signed-off-by: Kefu Chai --- src/rgw/driver/d4n/d4n_directory.h | 5 +++++ src/rgw/driver/d4n/rgw_sal_d4n.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/rgw/driver/d4n/d4n_directory.h b/src/rgw/driver/d4n/d4n_directory.h index a52c931e5888..499b73da1186 100644 --- a/src/rgw/driver/d4n/d4n_directory.h +++ b/src/rgw/driver/d4n/d4n_directory.h @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -40,7 +41,11 @@ public: if (!m_is_pool_connected) { for(auto& it:m_pool) { auto conn = it; +#if BOOST_VERSION >= 108900 + conn->async_run(m_cfg, boost::asio::consign(boost::asio::detached, conn)); +#else conn->async_run(m_cfg, {}, boost::asio::consign(boost::asio::detached, conn)); +#endif } m_is_pool_connected = true; } diff --git a/src/rgw/driver/d4n/rgw_sal_d4n.cc b/src/rgw/driver/d4n/rgw_sal_d4n.cc index d48dacab6747..2e348581dff3 100644 --- a/src/rgw/driver/d4n/rgw_sal_d4n.cc +++ b/src/rgw/driver/d4n/rgw_sal_d4n.cc @@ -15,6 +15,7 @@ #include "rgw_perf_counters.h" #include +#include #include #include "rgw_sal_d4n.h" @@ -77,7 +78,11 @@ int D4NFilterDriver::initialize(CephContext *cct, const DoutPrefixProvider *dpp) return -EDESTADDRREQ; } +#if BOOST_VERSION >= 108900 + conn->async_run(cfg, net::consign(net::detached, conn)); +#else conn->async_run(cfg, {}, net::consign(net::detached, conn)); +#endif FilterDriver::initialize(cct, dpp); -- 2.47.3