]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: allow apply_olh_log to rewrite the same olh version
authorCasey Bodley <cbodley@redhat.com>
Fri, 1 Nov 2019 14:48:41 +0000 (10:48 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 21 Jan 2020 22:12:53 +0000 (23:12 +0100)
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 <cbodley@redhat.com>
(cherry picked from commit d78aa3f4d4e283726d9c3b35a477b238df6b5af1)

src/rgw/rgw_rados.cc

index f5fa849a85360d1173097961f8c8f66bba5d8da7..be37116c32f66f27b1dc89e7846f8a6e25567d1d 100644 (file)
@@ -7470,7 +7470,7 @@ int RGWRados::apply_olh_log(RGWObjectCtx& obj_ctx, RGWObjState& state, const RGW
   map<uint64_t, vector<rgw_bucket_olh_log_entry> >::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);