}
template <typename... Types>
-void redis_exec_cp(std::shared_ptr<rgw::d4n::RedisPool> pool,
+void redis_exec_cp(const DoutPrefixProvider* dpp,
+ std::shared_ptr<rgw::d4n::RedisPool> pool,
boost::system::error_code& ec,
const boost::redis::request& req,
boost::redis::response<Types...>& resp,
optional_yield y)
{
//purpose: Execute a Redis command using a connection from the pool
- std::shared_ptr<connection> conn = pool->acquire();
+ std::shared_ptr<connection> conn = pool->acquire(dpp);
try {
if (y) {
}
}
-void redis_exec_cp(std::shared_ptr<rgw::d4n::RedisPool> pool,
+void redis_exec_cp(const DoutPrefixProvider* dpp,
+ std::shared_ptr<rgw::d4n::RedisPool> pool,
boost::system::error_code& ec,
const boost::redis::request& req,
boost::redis::generic_response& resp, optional_yield y)
{
//purpose: Execute a Redis command using a connection from the pool
- std::shared_ptr<connection> conn = pool->acquire();
+ std::shared_ptr<connection> conn = pool->acquire(dpp);
try {
if (y) {
ldpp_dout(dpp, 0) << "Directory::" << __func__ << " not using connection-pool, it's using the shared connection " << dendl;
}
else[[likely]]
- redis_exec_cp(redis_pool, ec, req, resp, y);
+ redis_exec_cp(dpp, redis_pool, ec, req, resp, y);
}
template <typename... Types>
ldpp_dout(dpp, 0) << "Directory::" << __func__ << " not using connection-pool, it's using the shared connection " << dendl;
}
else[[likely]]
- redis_exec_cp(redis_pool, ec, req, resp, y);
+ redis_exec_cp(dpp, redis_pool, ec, req, resp, y);
}
int BucketDirectory::zadd(const DoutPrefixProvider* dpp, const std::string& bucket_id, double score, const std::string& member, optional_yield y, Pipeline* pipeline)
cancel_all();
}
- std::shared_ptr<connection> acquire() {
+ std::shared_ptr<connection> acquire(const DoutPrefixProvider* dpp = nullptr) {
std::unique_lock<std::mutex> lock(m_aquire_release_mtx);
if (!m_is_pool_connected) {
}
if (m_pool.empty()) {
- maybe_warn_about_blocking(nullptr);
+ if (dpp) {
+ maybe_warn_about_blocking(dpp);
+ }
//wait until m_pool is not empty
m_cond_var.wait(lock, [this] { return !m_pool.empty(); });
- }
+ }
auto conn = m_pool.front();
m_pool.pop_front();
return conn;