Skip to content

Commit

Permalink
rgw: RGWPeriodPusher spawns http thread before cr thread
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/19834

Signed-off-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
cbodley committed May 3, 2017
1 parent dd75531 commit 21a943d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rgw/rgw_period_pusher.cc
Expand Up @@ -135,10 +135,11 @@ class RGWPeriodPusher::CRThread {
std::map<std::string, RGWRESTConn>&& 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()
{
Expand Down

0 comments on commit 21a943d

Please sign in to comment.