mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
rgw/multisite: fix bucket shard state init function
* make sure src/dest shard ids are the same in sync pair * copy sync pair by value in coroutine loop Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
This commit is contained in:
parent
e73eac1bbd
commit
950251f923
@ -2988,7 +2988,7 @@ class CheckAllBucketShardStatusIsIncremental : public RGWShardCollectCR {
|
||||
if (shard >= num_shards || status < 0 || !*result) {
|
||||
return false;
|
||||
}
|
||||
sync_pair.dest_bs.shard_id = shard++;
|
||||
sync_pair.dest_bs.shard_id = sync_pair.source_bs.shard_id = shard++;
|
||||
spawn(new CheckBucketShardStatusIsIncremental(sc, sync_pair, result), false);
|
||||
return true;
|
||||
}
|
||||
@ -3010,7 +3010,7 @@ class CheckAllBucketShardStatusIsIncremental : public RGWShardCollectCR {
|
||||
// and a loop to retry on racing writes
|
||||
class InitBucketShardStatusCR : public RGWCoroutine {
|
||||
RGWDataSyncCtx* sc;
|
||||
const rgw_bucket_sync_pair_info& pair;
|
||||
rgw_bucket_sync_pair_info pair;
|
||||
rgw_bucket_shard_sync_info status;
|
||||
RGWObjVersionTracker objv;
|
||||
rgw_bucket_index_marker_info& info;
|
||||
@ -3091,7 +3091,7 @@ class InitBucketShardStatusCollectCR : public RGWShardCollectCR {
|
||||
if (shard >= num_shards || status < 0) { // stop spawning on any errors
|
||||
return false;
|
||||
}
|
||||
sync_pair.dest_bs.shard_id = shard++;
|
||||
sync_pair.dest_bs.shard_id = sync_pair.source_bs.shard_id = shard++;
|
||||
spawn(new InitBucketShardStatusCR(sc, sync_pair, info, marker_mgr), false);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user