]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: check all users bucket for resharding, this will reshard bucket created in older... 15665/head
authorOrit Wasserman <owasserm@redhat.com>
Sun, 11 Jun 2017 13:04:52 +0000 (16:04 +0300)
committerOrit Wasserman <owasserm@redhat.com>
Thu, 22 Jun 2017 06:31:02 +0000 (09:31 +0300)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_rados.cc
src/rgw/rgw_user.cc

index 721fc30f5a2c0623e50b5e5674fb2552f4982fb2..2002abfbc2fdedab9de3551bbd492d796c750688 100644 (file)
@@ -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);
   }
 
index 2a2f3dd386abff1dc2bb4f1434c38893a5e85dcc..a73ff047f58380cd6a191afa10fdef636f5953de 100644 (file)
@@ -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);