From: Orit Wasserman Date: Sun, 11 Jun 2017 13:04:52 +0000 (+0300) Subject: rgw: check all users bucket for resharding, this will reshard bucket created in older... X-Git-Tag: ses5-milestone7~3^2~5^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15665%2Fhead;p=ceph.git rgw: check all users bucket for resharding, this will reshard bucket created in older versions Signed-off-by: Orit Wasserman --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 721fc30f5a2c..2002abfbc2fd 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -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); } diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 2a2f3dd386ab..a73ff047f583 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -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);