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 multisite: fix the increamtal bucket sync init #11553

Merged
merged 1 commit into from
Oct 20, 2016
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
13 changes: 7 additions & 6 deletions src/rgw/rgw_data_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1747,13 +1747,14 @@ class RGWInitBucketShardSyncStatusCoroutine : public RGWCoroutine {

string lock_name;
string cookie;
rgw_bucket_shard_sync_info status;
rgw_bucket_shard_sync_info& status;

bucket_index_marker_info info;
public:
RGWInitBucketShardSyncStatusCoroutine(RGWDataSyncEnv *_sync_env,
const rgw_bucket_shard& bs)
: RGWCoroutine(_sync_env->cct), sync_env(_sync_env), bs(bs) {
const rgw_bucket_shard& bs,
rgw_bucket_shard_sync_info& _status)
: RGWCoroutine(_sync_env->cct), sync_env(_sync_env), bs(bs), status(_status) {
store = sync_env->store;
lock_name = "sync_lock";

Expand Down Expand Up @@ -1814,7 +1815,8 @@ class RGWInitBucketShardSyncStatusCoroutine : public RGWCoroutine {

RGWCoroutine *RGWRemoteBucketLog::init_sync_status_cr()
{
return new RGWInitBucketShardSyncStatusCoroutine(&sync_env, bs);
rgw_bucket_shard_sync_info sync_status;
return new RGWInitBucketShardSyncStatusCoroutine(&sync_env, bs, sync_status);
}

template <class T>
Expand Down Expand Up @@ -2747,8 +2749,7 @@ int RGWRunBucketSyncCoroutine::operate()

yield {
if ((rgw_bucket_shard_sync_info::SyncState)sync_status.state == rgw_bucket_shard_sync_info::StateInit) {
call(new RGWInitBucketShardSyncStatusCoroutine(sync_env, bs));
sync_status.state = rgw_bucket_shard_sync_info::StateFullSync;
call(new RGWInitBucketShardSyncStatusCoroutine(sync_env, bs, sync_status));
}
}

Expand Down