From 21a943da45032a276997a0a885e869e2c2bc321d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 3 May 2017 11:32:34 -0400 Subject: [PATCH] rgw: RGWPeriodPusher spawns http thread before cr thread Fixes: http://tracker.ceph.com/issues/19834 Signed-off-by: Casey Bodley --- src/rgw/rgw_period_pusher.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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() { -- 2.47.3