From: Casey Bodley Date: Fri, 1 Nov 2019 14:48:41 +0000 (-0400) Subject: rgw: allow apply_olh_log to rewrite the same olh version X-Git-Tag: v15.1.0~765^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F31325%2Fhead;p=ceph.git rgw: allow apply_olh_log to rewrite the same olh version if two zones write an object version with the same olh epoch, apply_olh_log needs to be able to write the more-current instance at the same epoch Fixes: https://tracker.ceph.com/issues/39142 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index acaab993e627..16014ed34632 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -6797,7 +6797,7 @@ int RGWRados::apply_olh_log(RGWObjectCtx& obj_ctx, RGWObjState& state, const RGW map >::iterator iter = log.begin(); op.cmpxattr(RGW_ATTR_OLH_ID_TAG, CEPH_OSD_CMPXATTR_OP_EQ, olh_tag); - op.cmpxattr(RGW_ATTR_OLH_VER, CEPH_OSD_CMPXATTR_OP_GT, last_ver); + op.cmpxattr(RGW_ATTR_OLH_VER, CEPH_OSD_CMPXATTR_OP_GTE, last_ver); bufferlist ver_bl; string last_ver_s = to_string(last_ver);