]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: RGWHTTPClient::wait() warns if it blocks in an asio thread
authorCasey Bodley <cbodley@redhat.com>
Fri, 30 Nov 2018 19:31:54 +0000 (14:31 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 29 Mar 2019 03:39:43 +0000 (23:39 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_http_client.cc

index c3ea3e38a69b5fabd5f222eb7e39bcf752b89dc7..8b36c2f78e86909e50c89df52c1774ef8758325d 100644 (file)
@@ -17,6 +17,7 @@
 #include "common/RefCountedObj.h"
 
 #include "rgw_coroutine.h"
+#include "rgw_tools.h"
 
 #include <atomic>
 
@@ -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;