From: Kefu Chai Date: Sat, 9 May 2026 06:39:17 +0000 (+0800) Subject: rgw/d4n: fix deprecated async_run overload in RedisPool X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68834%2Fhead;p=ceph.git 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 --- 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);