]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add bucket to resharding queue if needs resharding
authorOrit Wasserman <owasserm@redhat.com>
Fri, 19 May 2017 11:02:17 +0000 (14:02 +0300)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 5 Jun 2017 20:18:00 +0000 (13:18 -0700)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_quota.cc
src/rgw/rgw_rados.cc

index 55dc64a0a72c04ac962194acbf3f575741e198bc..212ec4ba9dd3415248ecea940f3f06c2f0838e54 100644 (file)
@@ -952,7 +952,7 @@ public:
     }
 
     if (bucket_stats.num_objects  + num_objs > num_shards * max_objs_per_shard) {
-      dout(10) << "resharding needed: stats.num_objects=" << bucket_stats.num_objects
+      ldout(store->ctx(), 0) << __func__ << ": resharding needed: stats.num_objects=" << bucket_stats.num_objects
              << " shard max_objects=" <<  max_objs_per_shard * num_shards << dendl;
       need_resharding = true;
     } else {
index 23914530c0cc0055635f806deffff2a3813ccc9e..7594840540aefa8b084b272abd02b23be7acd4b0 100644 (file)
@@ -13135,7 +13135,7 @@ int RGWRados::add_bucket_to_reshard(const RGWBucketInfo& bucket_info)
   entry.bucket_name = bucket_info.bucket.name;
   entry.bucket_id = bucket_info.bucket.bucket_id;
   entry.old_num_shards = num_source_shards;
-  entry.new_num_shards = num_source_shards >> 1;
+  entry.new_num_shards = num_source_shards << 1;
 
   return reshard.add(entry);
 }