From: Casey Bodley Date: Thu, 9 Mar 2017 20:24:08 +0000 (-0500) Subject: rgw: clear old zone short ids on period update X-Git-Tag: v10.2.7~9^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f3face61351a61f3b71dfb8268a4b645c4d92da2;p=ceph.git rgw: clear old zone short ids on period update the short ids of old, removed zones were being kept in the period to guard against hash collisions with new zones but for a hash collision to cause a wrong object to sync, that object would have to be uploaded simultaneously to two different zones that had the same short id to avoid this, we just have to prevent the period from containing two colliding zones at the same time - we don't have to remember old zone short ids forever Fixes: http://tracker.ceph.com/issues/15618 Signed-off-by: Casey Bodley (cherry picked from commit 9c45633c836c966ab1f75ea2b1ad3fa0a4886600) --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index d6284c777807..dc227815d810 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -1176,6 +1176,10 @@ int RGWPeriod::update() return ret; } + // clear zone short ids of removed zones. period_map.update() will add the + // remaining zones back + period_map.short_zone_ids.clear(); + for (auto& iter : zonegroups) { RGWZoneGroup zg(string(), iter); ret = zg.init(cct, store);