]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: RGWSI_Zone::can_reshard() respects zonegroup 'resharding' feature
authorCasey Bodley <cbodley@redhat.com>
Wed, 3 Mar 2021 21:58:33 +0000 (16:58 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 13 Sep 2021 16:27:51 +0000 (12:27 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/services/svc_zone.cc

index a3502b3b5abe2c88436d7b2d85000a94353af87d..94f806a36b22db0bf8674a634636dacbb5f207b3 100644 (file)
@@ -1074,8 +1074,14 @@ bool RGWSI_Zone::need_to_log_metadata() const
 
 bool RGWSI_Zone::can_reshard() const
 {
-  return current_period->get_id().empty() ||
-    (zonegroup->zones.size() == 1 && current_period->is_single_zonegroup());
+  if (current_period->get_id().empty()) {
+    return true; // no realm
+  }
+  if (zonegroup->zones.size() == 1 && current_period->is_single_zonegroup()) {
+    return true; // single zone/zonegroup
+  }
+  // 'resharding' feature enabled in zonegroup
+  return zonegroup->supports(rgw::zone_features::resharding);
 }
 
 /**