Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: use separate http_manager for read_sync_status #13660

Merged
merged 1 commit into from Mar 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 22 additions & 2 deletions src/rgw/rgw_data_sync.cc
Expand Up @@ -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)
Expand Down