diff options
author | Seena Fallah <seenafallah@gmail.com> | 2024-11-26 01:15:31 +0100 |
---|---|---|
committer | Seena Fallah <seenafallah@gmail.com> | 2024-11-26 01:22:55 +0100 |
commit | 59cc81a0c692623fc9bb0c8445a20914880320ca (patch) | |
tree | ff710102e978e4d1b5983edefef74c92ddba5295 /src/rgw/services | |
parent | Merge pull request #60756 from ArbitCode/wip-raja-rgw-fix-68211 (diff) | |
download | ceph-59cc81a0c692623fc9bb0c8445a20914880320ca.tar.xz ceph-59cc81a0c692623fc9bb0c8445a20914880320ca.zip |
rgw: consider multi zonegroup for is_syncing_bucket_meta
Updated is_syncing_bucket_meta() to account for multi-zone and
multi-zonegroup scenarios during this check.
Fixes: https://tracker.ceph.com/issues/69049
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
Diffstat (limited to 'src/rgw/services')
-rw-r--r-- | src/rgw/services/svc_zone.cc | 24 | ||||
-rw-r--r-- | src/rgw/services/svc_zone.h | 2 |
2 files changed, 4 insertions, 22 deletions
diff --git a/src/rgw/services/svc_zone.cc b/src/rgw/services/svc_zone.cc index 70cf40eb6cb..61360135dd9 100644 --- a/src/rgw/services/svc_zone.cc +++ b/src/rgw/services/svc_zone.cc @@ -743,8 +743,7 @@ bool RGWSI_Zone::is_meta_master() const bool RGWSI_Zone::need_to_log_metadata() const { - return is_meta_master() && - (zonegroup->zones.size() > 1 || current_period->is_multi_zonegroups_with_zones()); + return is_meta_master() && is_syncing_bucket_meta(); } bool RGWSI_Zone::can_reshard() const @@ -761,33 +760,16 @@ bool RGWSI_Zone::can_reshard() const /** * Check to see if the bucket metadata could be synced - * bucket: the bucket to check * Returns false is the bucket is not synced */ -bool RGWSI_Zone::is_syncing_bucket_meta(const rgw_bucket& bucket) +bool RGWSI_Zone::is_syncing_bucket_meta() const { - /* no current period */ if (current_period->get_id().empty()) { return false; } - /* zonegroup is not master zonegroup */ - if (!zonegroup->is_master_zonegroup()) { - return false; - } - - /* single zonegroup and a single zone */ - if (current_period->is_single_zonegroup() && zonegroup->zones.size() == 1) { - return false; - } - - /* zone is not master */ - if (zonegroup->master_zone != zone_public_config->id) { - return false; - } - - return true; + return zonegroup->zones.size() > 1 || current_period->is_multi_zonegroups_with_zones(); } diff --git a/src/rgw/services/svc_zone.h b/src/rgw/services/svc_zone.h index c4a3a28f0d7..1b3f49587a3 100644 --- a/src/rgw/services/svc_zone.h +++ b/src/rgw/services/svc_zone.h @@ -146,7 +146,7 @@ public: bool need_to_log_data() const; bool need_to_log_metadata() const; bool can_reshard() const; - bool is_syncing_bucket_meta(const rgw_bucket& bucket); + bool is_syncing_bucket_meta() const; int list_zonegroups(const DoutPrefixProvider *dpp, std::list<std::string>& zonegroups); int list_regions(const DoutPrefixProvider *dpp, std::list<std::string>& regions); |