From: Casey Bodley Date: Wed, 3 May 2017 15:32:34 +0000 (-0400) Subject: rgw: RGWPeriodPusher spawns http thread before cr thread X-Git-Tag: v12.0.3~93^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14936%2Fhead;p=ceph.git rgw: RGWPeriodPusher spawns http thread before cr thread Fixes: http://tracker.ceph.com/issues/19834 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_period_pusher.cc b/src/rgw/rgw_period_pusher.cc index d6b2eabec39..75b454cf1c6 100644 --- a/src/rgw/rgw_period_pusher.cc +++ b/src/rgw/rgw_period_pusher.cc @@ -135,10 +135,11 @@ class RGWPeriodPusher::CRThread { std::map&& conns) : coroutines(cct, NULL), http(cct, coroutines.get_completion_mgr()), - push_all(new PushAllCR(cct, &http, std::move(period), std::move(conns))), - thread([this] { coroutines.run(push_all.get()); }) + push_all(new PushAllCR(cct, &http, std::move(period), std::move(conns))) { http.set_threaded(); + // must spawn the CR thread after set_threaded + thread = std::thread([this] { coroutines.run(push_all.get()); }); } ~CRThread() {