]> 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)
committerCasey Bodley <cbodley@redhat.com>
Fri, 27 May 2022 19:47:33 +0000 (15:47 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/services/svc_zone.cc

index ab77f6aef6eeb8ea553c7a0db5588dce9691b652..f314ea79c0c40e6ec438bd1ebeb04d016255b57d 100644 (file)
@@ -1076,8 +1076,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);
 }
 
 /**