mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
rgw: check all users bucket for resharding, this will reshard bucket created in older versions
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
This commit is contained in:
parent
b95093356b
commit
ad420d5574
@ -13120,6 +13120,9 @@ int RGWRados::check_bucket_shards(const RGWBucketInfo& bucket_info, const rgw_bu
|
||||
}
|
||||
|
||||
if (need_resharding) {
|
||||
ldout(cct, 20) << __func__ << " bucket " << bucket.name << " need resharding " <<
|
||||
" old num shards " << bucket_info.num_shards << " new num shards " << suggested_num_shards <<
|
||||
dendl;
|
||||
return add_bucket_to_reshard(bucket_info, suggested_num_shards);
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,11 @@ int rgw_user_sync_all_stats(RGWRados *store, const rgw_user& user_id)
|
||||
ldout(cct, 0) << "ERROR: could not sync bucket stats: ret=" << ret << dendl;
|
||||
return ret;
|
||||
}
|
||||
RGWQuotaInfo bucket_quota;
|
||||
ret = store->check_bucket_shards(bucket_info, bucket_info.bucket, bucket_quota);
|
||||
if (ret < 0) {
|
||||
ldout(cct, 0) << "ERROR in check_bucket_shards: " << cpp_strerror(-ret)<< dendl;
|
||||
}
|
||||
}
|
||||
} while (is_truncated);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user