]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: RGWPeriodMap::update() only hashes given zonegroup
authorCasey Bodley <cbodley@redhat.com>
Fri, 29 Apr 2016 21:43:40 +0000 (17:43 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 2 May 2016 20:27:59 +0000 (16:27 -0400)
RGWPeriodMap::update() is called with each zonegroup, so it only needs
to generate short_zone_ids for the zones in the given zonegroup

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rados.cc

index 5fef5921bf8d4d38160a0dedecfc8815ab1290ce..f1d7bfcdff7896d22da91940811624a4558c6463 100644 (file)
@@ -1653,13 +1653,11 @@ int RGWPeriodMap::update(const RGWZoneGroup& zonegroup, CephContext *cct)
     master_zonegroup = "";
   }
 
-  for (auto iter : zonegroups) {
-    for (auto i : iter.second.zones) {
-      string& zone_id = i.second.id;
-      if (short_zone_ids.find(zone_id) == short_zone_ids.end()) {
-        uint32_t short_id = gen_short_zone_id(zone_id);
-        short_zone_ids[i.second.id] = short_id;
-      }
+  for (auto& i : zonegroup.zones) {
+    string& zone_id = i.second.id;
+    if (short_zone_ids.find(zone_id) == short_zone_ids.end()) {
+      uint32_t short_id = gen_short_zone_id(zone_id);
+      short_zone_ids[i.second.id] = short_id;
     }
   }