From e0a2d1b8cb2e503152e5a6fd94c529c56ce210cb Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 30 Nov 2018 14:31:54 -0500 Subject: [PATCH] rgw: RGWHTTPClient::wait() warns if it blocks in an asio thread Signed-off-by: Casey Bodley --- src/rgw/rgw_http_client.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rgw/rgw_http_client.cc b/src/rgw/rgw_http_client.cc index c3ea3e38a69..8b36c2f78e8 100644 --- a/src/rgw/rgw_http_client.cc +++ b/src/rgw/rgw_http_client.cc @@ -17,6 +17,7 @@ #include "common/RefCountedObj.h" #include "rgw_coroutine.h" +#include "rgw_tools.h" #include @@ -76,6 +77,10 @@ struct rgw_http_req_data : public RefCountedObject { async_wait(context, yield[ec]); return -ec.value(); } + // work on asio threads should be asynchronous, so warn when they block + if (is_asio_thread) { + dout(20) << "WARNING: blocking http request" << dendl; + } #endif cond.Wait(lock); return ret; -- 2.39.5