diff options
author | Casey Bodley <cbodley@users.noreply.github.com> | 2017-03-09 15:47:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 15:47:29 +0100 |
commit | 2bb96e08eaed926ae04e9cb541bc80700dc54f9b (patch) | |
tree | 6f525fcdd3736065c7695176026ca506e1e4abdd | |
parent | Merge pull request #13878 from smithfarm/wip-jewel-release-notes-fixup (diff) | |
parent | rgw: use separate http_manager for read_sync_status (diff) | |
download | ceph-2bb96e08eaed926ae04e9cb541bc80700dc54f9b.tar.xz ceph-2bb96e08eaed926ae04e9cb541bc80700dc54f9b.zip |
Merge pull request #13660 from shashalu/rgw-read-sync-status
rgw: use separate http_manager for read_sync_status
Reviewed-by: Casey Bodley <cbodley@redhat.com>
-rw-r--r-- | src/rgw/rgw_data_sync.cc | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 102c8c8b233..3d82956320f 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -642,13 +642,33 @@ int RGWRemoteDataLog::read_sync_status(rgw_data_sync_status *sync_status) { // cannot run concurrently with run_sync(), so run in a separate manager RGWCoroutinesManager crs(store->ctx(), store->get_cr_registry()); - return crs.run(new RGWReadDataSyncStatusCoroutine(&sync_env, sync_status)); + RGWHTTPManager http_manager(store->ctx(), crs.get_completion_mgr()); + int ret = http_manager.set_threaded(); + if (ret < 0) { + ldout(store->ctx(), 0) << "failed in http_manager.set_threaded() ret=" << ret << dendl; + return ret; + } + RGWDataSyncEnv sync_env_local = sync_env; + sync_env_local.http_manager = &http_manager; + ret = crs.run(new RGWReadDataSyncStatusCoroutine(&sync_env_local, sync_status)); + http_manager.stop(); + return ret; } int RGWRemoteDataLog::init_sync_status(int num_shards) { RGWCoroutinesManager crs(store->ctx(), store->get_cr_registry()); - return crs.run(new RGWInitDataSyncStatusCoroutine(&sync_env, num_shards)); + RGWHTTPManager http_manager(store->ctx(), crs.get_completion_mgr()); + int ret = http_manager.set_threaded(); + if (ret < 0) { + ldout(store->ctx(), 0) << "failed in http_manager.set_threaded() ret=" << ret << dendl; + return ret; + } + RGWDataSyncEnv sync_env_local = sync_env; + sync_env_local.http_manager = &http_manager; + ret = crs.run(new RGWInitDataSyncStatusCoroutine(&sync_env_local, num_shards)); + http_manager.stop(); + return ret; } static string full_data_sync_index_shard_oid(const string& source_zone, int shard_id) |