]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #17148 from smithfarm/wip-20292-jewel
authorNathan Cutler <presnypreklad@gmail.com>
Tue, 12 Sep 2017 19:58:54 +0000 (21:58 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Sep 2017 19:58:54 +0000 (21:58 +0200)
jewel: rgw: multisite: log_meta on secondary zone causes continuous loop of metadata sync

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
1  2 
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

Simple merge
index 88a8fd2ef3a238ed48f4ce168e1d2b0106fd4d27,9c3de8fdb2338110c585ca67b7e2e3c6b8e5efdc..b2e82c6c4dd741cbbfe6ea6deb2206b0e86b2404
@@@ -1498,13 -1496,29 +1498,32 @@@ public
    int get_zonegroup(RGWZoneGroup& zonegroup,
                    const string& zonegroup_id);
  
-   bool is_single_zonegroup(CephContext *cct, RGWRados *store);
+   bool is_single_zonegroup()
+   {
+       return (period_map.zonegroups.size() == 1);
+   }
+   /*
+     returns true if there are several zone groups with a least one zone
+    */
+   bool is_multi_zonegroups_with_zones()
+   {
+     int count = 0;
+     for (const auto& zg:  period_map.zonegroups) {
+       if (zg.second.zones.size() > 0) {
+       if (count++ > 0) {
+         return true;
+       }
+       }
+     }
+     return false;
+   }
  
    int get_latest_epoch(epoch_t& epoch);
 -  int set_latest_epoch(epoch_t epoch, bool exclusive = false);
 +  int set_latest_epoch(epoch_t epoch, bool exclusive = false,
 +                       RGWObjVersionTracker *objv = nullptr);
 +  // update latest_epoch if the given epoch is higher, else return -EEXIST
 +  int update_latest_epoch(epoch_t epoch);
  
    int init(CephContext *_cct, RGWRados *_store, const string &period_realm_id, const string &period_realm_name = "",
           bool setup_obj = true);